@alepha/devtools 0.14.4 → 0.15.0
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/assets/devtools/actions.html +19 -19
- package/assets/devtools/actions.html.br +0 -0
- package/assets/devtools/actions.html.gz +0 -0
- package/assets/devtools/asset.CMFNRMve.css +1 -0
- package/assets/devtools/asset.CMFNRMve.css.br +0 -0
- package/assets/devtools/asset.CMFNRMve.css.gz +0 -0
- package/assets/devtools/atoms.html +19 -19
- package/assets/devtools/atoms.html.br +0 -0
- package/assets/devtools/atoms.html.gz +0 -0
- package/assets/devtools/caches.html +19 -19
- package/assets/devtools/caches.html.br +0 -0
- package/assets/devtools/caches.html.gz +0 -0
- package/assets/devtools/{chunk.BZpSlmHc.js → chunk.-1T4AUjH.js} +1 -1
- package/assets/devtools/chunk.-1T4AUjH.js.br +0 -0
- package/assets/devtools/chunk.-1T4AUjH.js.gz +0 -0
- package/assets/devtools/{chunk.CsxSstrk.js → chunk.01h1zGjv.js} +1 -1
- package/assets/devtools/chunk.01h1zGjv.js.br +0 -0
- package/assets/devtools/chunk.01h1zGjv.js.gz +0 -0
- package/assets/devtools/chunk.1JiUrdgo.js +1 -0
- package/assets/devtools/chunk.1JiUrdgo.js.br +1 -0
- package/assets/devtools/chunk.1JiUrdgo.js.gz +0 -0
- package/assets/devtools/chunk.42CgRmmy.js +1 -0
- package/assets/devtools/chunk.42CgRmmy.js.br +0 -0
- package/assets/devtools/chunk.42CgRmmy.js.gz +0 -0
- package/assets/devtools/{chunk.CEbDj1NR.js → chunk.6zj3eUIy.js} +1 -1
- package/assets/devtools/chunk.6zj3eUIy.js.br +0 -0
- package/assets/devtools/chunk.6zj3eUIy.js.gz +0 -0
- package/assets/devtools/{chunk.D0jFBu2p.js → chunk.B1BX4OlP.js} +1 -1
- package/assets/devtools/chunk.B1BX4OlP.js.br +0 -0
- package/assets/devtools/chunk.B1BX4OlP.js.gz +0 -0
- package/assets/devtools/{chunk.BCBZ1wAk.js → chunk.B6bX0XQI.js} +1 -1
- package/assets/devtools/chunk.B6bX0XQI.js.br +0 -0
- package/assets/devtools/chunk.B6bX0XQI.js.gz +0 -0
- package/assets/devtools/{chunk.BgMi2Pqe.js → chunk.BD3_boSH.js} +1 -1
- package/assets/devtools/chunk.BD3_boSH.js.br +0 -0
- package/assets/devtools/chunk.BD3_boSH.js.gz +0 -0
- package/assets/devtools/chunk.BZZjyIAY.js +2 -0
- package/assets/devtools/chunk.BZZjyIAY.js.br +0 -0
- package/assets/devtools/chunk.BZZjyIAY.js.gz +0 -0
- package/assets/devtools/{chunk.C3geCUq9.js → chunk.B_arS3yh.js} +1 -1
- package/assets/devtools/chunk.B_arS3yh.js.br +0 -0
- package/assets/devtools/chunk.B_arS3yh.js.gz +0 -0
- package/assets/devtools/{chunk.B-FEo0lV.js → chunk.CC4zyxCR.js} +1 -1
- package/assets/devtools/chunk.CC4zyxCR.js.br +0 -0
- package/assets/devtools/chunk.CC4zyxCR.js.gz +0 -0
- package/assets/devtools/{chunk.BX7p74D8.js → chunk.CQFdZ3hg.js} +1 -1
- package/assets/devtools/chunk.CQFdZ3hg.js.br +0 -0
- package/assets/devtools/chunk.CQFdZ3hg.js.gz +0 -0
- package/assets/devtools/{chunk.BqEqrty9.js → chunk.CXR8SXil.js} +1 -1
- package/assets/devtools/chunk.CXR8SXil.js.br +0 -0
- package/assets/devtools/chunk.CXR8SXil.js.gz +0 -0
- package/assets/devtools/{chunk.BjOMCPQ3.js → chunk.C_WwXcGr.js} +1 -1
- package/assets/devtools/chunk.C_WwXcGr.js.br +0 -0
- package/assets/devtools/chunk.C_WwXcGr.js.gz +0 -0
- package/assets/devtools/chunk.Chph6jJx.js +1 -0
- package/assets/devtools/chunk.Chph6jJx.js.br +0 -0
- package/assets/devtools/chunk.Chph6jJx.js.gz +0 -0
- package/assets/devtools/{chunk.CZ4J9K5b.js → chunk.D8mKET3e.js} +1 -1
- package/assets/devtools/chunk.D8mKET3e.js.br +0 -0
- package/assets/devtools/chunk.D8mKET3e.js.gz +0 -0
- package/assets/devtools/chunk.DP_hRYka.js +1 -0
- package/assets/devtools/chunk.DP_hRYka.js.br +0 -0
- package/assets/devtools/chunk.DP_hRYka.js.gz +0 -0
- package/assets/devtools/{chunk.W-1mjDd7.js → chunk.D_B99PWK.js} +1 -1
- package/assets/devtools/chunk.D_B99PWK.js.br +0 -0
- package/assets/devtools/chunk.D_B99PWK.js.gz +0 -0
- package/assets/devtools/{chunk.CoD2sLa1.js → chunk.Dwq9t2Dl.js} +1 -1
- package/assets/devtools/chunk.Dwq9t2Dl.js.br +0 -0
- package/assets/devtools/chunk.Dwq9t2Dl.js.gz +0 -0
- package/assets/devtools/{chunk.5EOPWu_h.js → chunk.DyNVihb8.js} +2 -2
- package/assets/devtools/chunk.DyNVihb8.js.br +0 -0
- package/assets/devtools/chunk.DyNVihb8.js.gz +0 -0
- package/assets/devtools/{chunk.D7ro5_n3.js → chunk.KNtbB1xL.js} +1 -1
- package/assets/devtools/chunk.KNtbB1xL.js.br +0 -0
- package/assets/devtools/chunk.KNtbB1xL.js.gz +0 -0
- package/assets/devtools/{chunk.lo8X57tY.js → chunk.MMyHzoxt.js} +1 -1
- package/assets/devtools/chunk.MMyHzoxt.js.br +0 -0
- package/assets/devtools/chunk.MMyHzoxt.js.gz +0 -0
- package/assets/devtools/{chunk.CQO49DQF.js → chunk.NIj8k4HU.js} +1 -1
- package/assets/devtools/chunk.NIj8k4HU.js.br +0 -0
- package/assets/devtools/chunk.NIj8k4HU.js.gz +0 -0
- package/assets/devtools/{chunk.CIYikik4.js → chunk.UjSU-RcH.js} +1 -1
- package/assets/devtools/chunk.UjSU-RcH.js.br +0 -0
- package/assets/devtools/chunk.UjSU-RcH.js.gz +0 -0
- package/assets/devtools/{chunk.BQQ5nN1l.js → chunk.Vm7uQYEE.js} +1 -1
- package/assets/devtools/chunk.Vm7uQYEE.js.br +0 -0
- package/assets/devtools/chunk.Vm7uQYEE.js.gz +0 -0
- package/assets/devtools/{chunk._t5z0lP9.js → chunk.WpBi-27p.js} +1 -1
- package/assets/devtools/chunk.WpBi-27p.js.br +0 -0
- package/assets/devtools/chunk.WpBi-27p.js.gz +0 -0
- package/assets/devtools/{chunk.ffYG67rk.js → chunk.X37zJjnv.js} +1 -1
- package/assets/devtools/chunk.X37zJjnv.js.br +0 -0
- package/assets/devtools/chunk.X37zJjnv.js.gz +0 -0
- package/assets/devtools/{chunk.u4exfSZ6.js → chunk.Yc53VNO7.js} +1 -1
- package/assets/devtools/chunk.Yc53VNO7.js.br +0 -0
- package/assets/devtools/chunk.Yc53VNO7.js.gz +0 -0
- package/assets/devtools/{chunk.BKZ6YEV4.js → chunk.jP0GrcaU.js} +1 -1
- package/assets/devtools/chunk.jP0GrcaU.js.br +0 -0
- package/assets/devtools/chunk.jP0GrcaU.js.gz +0 -0
- package/assets/devtools/chunk.ovzUqJjU.js +1 -0
- package/assets/devtools/chunk.ovzUqJjU.js.br +0 -0
- package/assets/devtools/chunk.ovzUqJjU.js.gz +0 -0
- package/assets/devtools/{chunk.albVVSQX.js → chunk.uK7gG_4K.js} +1 -1
- package/assets/devtools/chunk.uK7gG_4K.js.br +0 -0
- package/assets/devtools/chunk.uK7gG_4K.js.gz +0 -0
- package/assets/devtools/chunk.xP6lcP0O.js +2 -0
- package/assets/devtools/chunk.xP6lcP0O.js.br +0 -0
- package/assets/devtools/chunk.xP6lcP0O.js.gz +0 -0
- package/assets/devtools/{chunk.xjh83uy1.js → chunk.yhAz0qwe.js} +1 -1
- package/assets/devtools/chunk.yhAz0qwe.js.br +0 -0
- package/assets/devtools/chunk.yhAz0qwe.js.gz +0 -0
- package/assets/devtools/db.html +16 -16
- package/assets/devtools/db.html.br +0 -0
- package/assets/devtools/db.html.gz +0 -0
- package/assets/devtools/entry.BdraBs_7.js +79 -0
- package/assets/devtools/entry.BdraBs_7.js.br +0 -0
- package/assets/devtools/entry.BdraBs_7.js.gz +0 -0
- package/assets/devtools/env.html +17 -17
- package/assets/devtools/env.html.br +0 -0
- package/assets/devtools/env.html.gz +0 -0
- package/assets/devtools/graph.html +18 -18
- package/assets/devtools/graph.html.br +0 -0
- package/assets/devtools/graph.html.gz +0 -0
- package/assets/devtools/index.html +13 -13
- package/assets/devtools/index.html.br +0 -0
- package/assets/devtools/index.html.gz +0 -0
- package/assets/devtools/logs.html +20 -20
- package/assets/devtools/logs.html.br +0 -0
- package/assets/devtools/logs.html.gz +0 -0
- package/assets/devtools/queues.html +12 -12
- package/assets/devtools/queues.html.br +0 -0
- package/assets/devtools/queues.html.gz +0 -0
- package/assets/devtools/topics.html +20 -20
- package/assets/devtools/topics.html.br +0 -0
- package/assets/devtools/topics.html.gz +0 -0
- package/dist/index.d.ts +336 -1619
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/api/DevToolsProvider.ts +3 -3
- package/src/api/providers/DevToolsDatabaseProvider.ts +1 -1
- package/src/api/providers/DevToolsMetadataProvider.ts +2 -2
- package/assets/devtools/asset.DbJSgVPr.css +0 -1
- package/assets/devtools/asset.DbJSgVPr.css.br +0 -0
- package/assets/devtools/asset.DbJSgVPr.css.gz +0 -0
- package/assets/devtools/chunk.5EOPWu_h.js.br +0 -0
- package/assets/devtools/chunk.5EOPWu_h.js.gz +0 -0
- package/assets/devtools/chunk.B-FEo0lV.js.br +0 -0
- package/assets/devtools/chunk.B-FEo0lV.js.gz +0 -0
- package/assets/devtools/chunk.BCBZ1wAk.js.br +0 -0
- package/assets/devtools/chunk.BCBZ1wAk.js.gz +0 -0
- package/assets/devtools/chunk.BKZ6YEV4.js.br +0 -0
- package/assets/devtools/chunk.BKZ6YEV4.js.gz +0 -0
- package/assets/devtools/chunk.BQQ5nN1l.js.br +0 -0
- package/assets/devtools/chunk.BQQ5nN1l.js.gz +0 -0
- package/assets/devtools/chunk.BX7p74D8.js.br +0 -0
- package/assets/devtools/chunk.BX7p74D8.js.gz +0 -0
- package/assets/devtools/chunk.BZpSlmHc.js.br +0 -0
- package/assets/devtools/chunk.BZpSlmHc.js.gz +0 -0
- package/assets/devtools/chunk.BgMi2Pqe.js.br +0 -0
- package/assets/devtools/chunk.BgMi2Pqe.js.gz +0 -0
- package/assets/devtools/chunk.BjOMCPQ3.js.br +0 -0
- package/assets/devtools/chunk.BjOMCPQ3.js.gz +0 -0
- package/assets/devtools/chunk.BqEqrty9.js.br +0 -0
- package/assets/devtools/chunk.BqEqrty9.js.gz +0 -0
- package/assets/devtools/chunk.BuGWOypT.js +0 -1
- package/assets/devtools/chunk.BuGWOypT.js.br +0 -0
- package/assets/devtools/chunk.BuGWOypT.js.gz +0 -0
- package/assets/devtools/chunk.C3geCUq9.js.br +0 -0
- package/assets/devtools/chunk.C3geCUq9.js.gz +0 -0
- package/assets/devtools/chunk.CEbDj1NR.js.br +0 -0
- package/assets/devtools/chunk.CEbDj1NR.js.gz +0 -0
- package/assets/devtools/chunk.CIYikik4.js.br +0 -0
- package/assets/devtools/chunk.CIYikik4.js.gz +0 -0
- package/assets/devtools/chunk.CQO49DQF.js.br +0 -0
- package/assets/devtools/chunk.CQO49DQF.js.gz +0 -0
- package/assets/devtools/chunk.CWwJDVEM.js +0 -1
- package/assets/devtools/chunk.CWwJDVEM.js.br +0 -0
- package/assets/devtools/chunk.CWwJDVEM.js.gz +0 -0
- package/assets/devtools/chunk.CZ4J9K5b.js.br +0 -4
- package/assets/devtools/chunk.CZ4J9K5b.js.gz +0 -0
- package/assets/devtools/chunk.CoD2sLa1.js.br +0 -0
- package/assets/devtools/chunk.CoD2sLa1.js.gz +0 -0
- package/assets/devtools/chunk.CsxSstrk.js.br +0 -0
- package/assets/devtools/chunk.CsxSstrk.js.gz +0 -0
- package/assets/devtools/chunk.D0jFBu2p.js.br +0 -0
- package/assets/devtools/chunk.D0jFBu2p.js.gz +0 -0
- package/assets/devtools/chunk.D7ro5_n3.js.br +0 -0
- package/assets/devtools/chunk.D7ro5_n3.js.gz +0 -0
- package/assets/devtools/chunk.W-1mjDd7.js.br +0 -0
- package/assets/devtools/chunk.W-1mjDd7.js.gz +0 -0
- package/assets/devtools/chunk._3YEef80.js +0 -1
- package/assets/devtools/chunk._3YEef80.js.br +0 -0
- package/assets/devtools/chunk._3YEef80.js.gz +0 -0
- package/assets/devtools/chunk._t5z0lP9.js.br +0 -0
- package/assets/devtools/chunk._t5z0lP9.js.gz +0 -0
- package/assets/devtools/chunk.albVVSQX.js.br +0 -0
- package/assets/devtools/chunk.albVVSQX.js.gz +0 -0
- package/assets/devtools/chunk.bPNpu2iW.js +0 -1
- package/assets/devtools/chunk.bPNpu2iW.js.br +0 -0
- package/assets/devtools/chunk.bPNpu2iW.js.gz +0 -0
- package/assets/devtools/chunk.fWijEdcZ.js +0 -2
- package/assets/devtools/chunk.fWijEdcZ.js.br +0 -0
- package/assets/devtools/chunk.fWijEdcZ.js.gz +0 -0
- package/assets/devtools/chunk.ffYG67rk.js.br +0 -0
- package/assets/devtools/chunk.ffYG67rk.js.gz +0 -0
- package/assets/devtools/chunk.lo8X57tY.js.br +0 -0
- package/assets/devtools/chunk.lo8X57tY.js.gz +0 -0
- package/assets/devtools/chunk.rqjDVBSo.js +0 -1
- package/assets/devtools/chunk.rqjDVBSo.js.br +0 -0
- package/assets/devtools/chunk.rqjDVBSo.js.gz +0 -0
- package/assets/devtools/chunk.u4exfSZ6.js.br +0 -0
- package/assets/devtools/chunk.u4exfSZ6.js.gz +0 -0
- package/assets/devtools/chunk.xjh83uy1.js.br +0 -0
- package/assets/devtools/chunk.xjh83uy1.js.gz +0 -0
- package/assets/devtools/chunk.yZM2qlCX.js +0 -2
- package/assets/devtools/chunk.yZM2qlCX.js.br +0 -0
- package/assets/devtools/chunk.yZM2qlCX.js.gz +0 -0
- package/assets/devtools/entry.BWhdC3SJ.js +0 -79
- package/assets/devtools/entry.BWhdC3SJ.js.br +0 -0
- package/assets/devtools/entry.BWhdC3SJ.js.gz +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,1712 +1,429 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { Validator } from "typebox/compile";
|
|
5
|
-
import dayjsDuration from "dayjs/plugin/duration.js";
|
|
6
|
-
import DayjsApi, { Dayjs, ManipulateType, PluginFunc } from "dayjs";
|
|
1
|
+
import * as alepha8 from "alepha";
|
|
2
|
+
import { Alepha, Static, TSchema } from "alepha";
|
|
3
|
+
import * as alepha_logger0 from "alepha/logger";
|
|
7
4
|
|
|
8
|
-
//#region ../alepha/src/core/constants/KIND.d.ts
|
|
9
|
-
/**
|
|
10
|
-
* Used for identifying primitives.
|
|
11
|
-
*
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
declare const KIND: unique symbol;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region ../alepha/src/core/interfaces/Service.d.ts
|
|
17
|
-
/**
|
|
18
|
-
* In Alepha, a service is a class that can be instantiated or an abstract class. Nothing more, nothing less...
|
|
19
|
-
*/
|
|
20
|
-
type Service<T extends object = any> = InstantiableClass<T> | AbstractClass<T> | RunFunction<T>;
|
|
21
|
-
type RunFunction<T extends object = any> = (...args: any[]) => T | void;
|
|
22
|
-
type InstantiableClass<T extends object = any> = new (...args: any[]) => T;
|
|
23
|
-
/**
|
|
24
|
-
* Abstract class is a class that cannot be instantiated directly!
|
|
25
|
-
* It widely used for defining interfaces.
|
|
26
|
-
*/
|
|
27
|
-
type AbstractClass<T extends object = any> = abstract new (...args: any[]) => T;
|
|
28
|
-
/**
|
|
29
|
-
* Service substitution allows you to register a class as a different class.
|
|
30
|
-
* Providing class A, but using class B instead.
|
|
31
|
-
* This is useful for testing, mocking, or providing a different implementation of a service.
|
|
32
|
-
*
|
|
33
|
-
* class A is mostly an AbstractClass, while class B is an InstantiableClass.
|
|
34
|
-
*/
|
|
35
|
-
interface ServiceSubstitution<T extends object = any> {
|
|
36
|
-
/**
|
|
37
|
-
* Every time someone asks for this class, it will be provided with the 'use' class.
|
|
38
|
-
*/
|
|
39
|
-
provide: Service<T>;
|
|
40
|
-
/**
|
|
41
|
-
* Service to use instead of the 'provide' service.
|
|
42
|
-
*
|
|
43
|
-
* Syntax is inspired by Angular's DI system.
|
|
44
|
-
*/
|
|
45
|
-
use: Service<T>;
|
|
46
|
-
/**
|
|
47
|
-
* If true, if the service already exists -> just ignore the substitution and do not throw an error.
|
|
48
|
-
* Mostly used for plugins to enforce a substitution without throwing an error.
|
|
49
|
-
*/
|
|
50
|
-
optional?: boolean;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Every time you register a service, you can use this type to define it.
|
|
54
|
-
*
|
|
55
|
-
* alepha.with( ServiceEntry )
|
|
56
|
-
* or
|
|
57
|
-
* alepha.with( provide: ServiceEntry, use: MyOwnServiceEntry )
|
|
58
|
-
*
|
|
59
|
-
* And yes, you declare the *type* of the service, not the *instance*.
|
|
60
|
-
*/
|
|
61
|
-
type ServiceEntry<T extends object = any> = Service<T> | ServiceSubstitution<T>;
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region ../alepha/src/core/helpers/primitive.d.ts
|
|
64
|
-
interface PrimitiveArgs<T extends object = {}> {
|
|
65
|
-
options: T;
|
|
66
|
-
alepha: Alepha;
|
|
67
|
-
service: InstantiableClass<Service>;
|
|
68
|
-
module?: Service;
|
|
69
|
-
}
|
|
70
|
-
interface PrimitiveConfig {
|
|
71
|
-
propertyKey: string;
|
|
72
|
-
service: InstantiableClass<Service>;
|
|
73
|
-
module?: Service;
|
|
74
|
-
}
|
|
75
|
-
declare abstract class Primitive<T extends object = {}> {
|
|
76
|
-
protected readonly alepha: Alepha;
|
|
77
|
-
readonly options: T;
|
|
78
|
-
readonly config: PrimitiveConfig;
|
|
79
|
-
constructor(args: PrimitiveArgs<T>);
|
|
80
|
-
/**
|
|
81
|
-
* Called automatically by Alepha after the primitive is created.
|
|
82
|
-
*/
|
|
83
|
-
protected onInit(): void;
|
|
84
|
-
}
|
|
85
|
-
type PrimitiveFactoryLike<T extends object = any> = {
|
|
86
|
-
(options: T): any;
|
|
87
|
-
[KIND]: any;
|
|
88
|
-
};
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region ../alepha/src/core/interfaces/Async.d.ts
|
|
91
|
-
/**
|
|
92
|
-
* Represents a value that can be either a value or a promise of value.
|
|
93
|
-
*/
|
|
94
|
-
type Async<T> = T | Promise<T>;
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region ../alepha/src/core/interfaces/LoggerInterface.d.ts
|
|
97
|
-
type LogLevel = "ERROR" | "WARN" | "INFO" | "DEBUG" | "TRACE" | "SILENT";
|
|
98
|
-
interface LoggerInterface {
|
|
99
|
-
trace(message: string, data?: unknown): void;
|
|
100
|
-
debug(message: string, data?: unknown): void;
|
|
101
|
-
info(message: string, data?: unknown): void;
|
|
102
|
-
warn(message: string, data?: unknown): void;
|
|
103
|
-
error(message: string, data?: unknown): void;
|
|
104
|
-
}
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region ../alepha/src/core/providers/TypeProvider.d.ts
|
|
107
|
-
declare module "typebox" {
|
|
108
|
-
interface TString {
|
|
109
|
-
format?: string;
|
|
110
|
-
minLength?: number;
|
|
111
|
-
maxLength?: number;
|
|
112
|
-
}
|
|
113
|
-
interface TNumber {
|
|
114
|
-
format?: "int64";
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
//#endregion
|
|
118
|
-
//#region ../alepha/src/core/primitives/$atom.d.ts
|
|
119
|
-
type AtomOptions<T extends TAtomObject, N extends string> = {
|
|
120
|
-
name: N;
|
|
121
|
-
schema: T;
|
|
122
|
-
description?: string;
|
|
123
|
-
} & (T extends TOptionalAdd<T> ? {
|
|
124
|
-
default?: Static$1<T>;
|
|
125
|
-
} : {
|
|
126
|
-
default: Static$1<T>;
|
|
127
|
-
});
|
|
128
|
-
declare class Atom<T extends TAtomObject = TObject$1, N extends string = string> {
|
|
129
|
-
readonly options: AtomOptions<T, N>;
|
|
130
|
-
get schema(): T;
|
|
131
|
-
get key(): N;
|
|
132
|
-
constructor(options: AtomOptions<T, N>);
|
|
133
|
-
}
|
|
134
|
-
type TAtomObject = TObject$1<any> | TArray;
|
|
135
|
-
type AtomStatic<T extends TAtomObject> = T extends TOptionalAdd<T> ? Static$1<T> | undefined : Static$1<T>;
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region ../alepha/src/core/primitives/$inject.d.ts
|
|
138
|
-
interface InjectOptions<T extends object = any> {
|
|
139
|
-
/**
|
|
140
|
-
* - 'transient' → Always a new instance on every inject. Zero caching.
|
|
141
|
-
* - 'singleton' → One instance per Alepha runtime (per-thread). Never disposed until Alepha shuts down. (default)
|
|
142
|
-
* - 'scoped' → One instance per AsyncLocalStorage context.
|
|
143
|
-
* - A new scope is created when Alepha handles a request, a scheduled job, a queue worker task...
|
|
144
|
-
* - You can also start a manual scope via alepha.context.run(() => { ... }).
|
|
145
|
-
* - When the scope ends, the scoped registry is discarded.
|
|
146
|
-
*
|
|
147
|
-
* @default "singleton"
|
|
148
|
-
*/
|
|
149
|
-
lifetime?: "transient" | "singleton" | "scoped";
|
|
150
|
-
/**
|
|
151
|
-
* Constructor arguments to pass when creating a new instance.
|
|
152
|
-
*/
|
|
153
|
-
args?: ConstructorParameters<InstantiableClass<T>>;
|
|
154
|
-
/**
|
|
155
|
-
* Parent that requested the instance.
|
|
156
|
-
*
|
|
157
|
-
* @internal
|
|
158
|
-
*/
|
|
159
|
-
parent?: Service | null;
|
|
160
|
-
}
|
|
161
|
-
//#endregion
|
|
162
|
-
//#region ../alepha/src/core/primitives/$module.d.ts
|
|
163
|
-
interface ModulePrimitiveOptions {
|
|
164
|
-
/**
|
|
165
|
-
* Name of the module.
|
|
166
|
-
*
|
|
167
|
-
* It should be in the format of `project.module.submodule`.
|
|
168
|
-
*/
|
|
169
|
-
name: string;
|
|
170
|
-
/**
|
|
171
|
-
* List all services related to this module.
|
|
172
|
-
*
|
|
173
|
-
* If you don't declare 'register' function, all services will be registered automatically.
|
|
174
|
-
* If you declare 'register' function, you must handle the registration of ALL services manually.
|
|
175
|
-
*/
|
|
176
|
-
services?: Array<Service>;
|
|
177
|
-
/**
|
|
178
|
-
* List of $primitives to register in the module.
|
|
179
|
-
*/
|
|
180
|
-
primitives?: Array<PrimitiveFactoryLike>;
|
|
181
|
-
/**
|
|
182
|
-
* By default, module will register ALL services.
|
|
183
|
-
* You can override this behavior by providing a register function.
|
|
184
|
-
* It's useful when you want to register services conditionally or in a specific order.
|
|
185
|
-
*
|
|
186
|
-
* Again, if you declare 'register', you must handle the registration of ALL services manually.
|
|
187
|
-
*/
|
|
188
|
-
register?: (alepha: Alepha) => void;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Base class for all modules.
|
|
192
|
-
*/
|
|
193
|
-
declare abstract class Module {
|
|
194
|
-
abstract readonly options: ModulePrimitiveOptions;
|
|
195
|
-
abstract register(alepha: Alepha): void;
|
|
196
|
-
static NAME_REGEX: RegExp;
|
|
197
|
-
/**
|
|
198
|
-
* Check if a Service is a Module.
|
|
199
|
-
*/
|
|
200
|
-
static is(ctor: Service): boolean;
|
|
201
|
-
/**
|
|
202
|
-
* Get the Module of a Service.
|
|
203
|
-
*
|
|
204
|
-
* Returns undefined if the Service is not part of a Module.
|
|
205
|
-
*/
|
|
206
|
-
static of(ctor: Service): Service<Module> | undefined;
|
|
207
|
-
}
|
|
208
|
-
//#endregion
|
|
209
|
-
//#region ../alepha/src/core/providers/AlsProvider.d.ts
|
|
210
|
-
type AsyncLocalStorageData = any;
|
|
211
|
-
declare class AlsProvider {
|
|
212
|
-
static create: () => AsyncLocalStorage<AsyncLocalStorageData> | undefined;
|
|
213
|
-
als?: AsyncLocalStorage<AsyncLocalStorageData>;
|
|
214
|
-
constructor();
|
|
215
|
-
createContextId(): string;
|
|
216
|
-
run<R>(callback: () => R, data?: Record<string, any>): R;
|
|
217
|
-
exists(): boolean;
|
|
218
|
-
get<T>(key: string): T | undefined;
|
|
219
|
-
set<T>(key: string, value: T): void;
|
|
220
|
-
}
|
|
221
|
-
//#endregion
|
|
222
|
-
//#region ../alepha/src/core/providers/Json.d.ts
|
|
223
|
-
/**
|
|
224
|
-
* Mimics the JSON global object with stringify and parse methods.
|
|
225
|
-
*
|
|
226
|
-
* Used across the codebase via dependency injection.
|
|
227
|
-
*/
|
|
228
|
-
declare class Json {
|
|
229
|
-
stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
230
|
-
parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
|
|
231
|
-
}
|
|
232
|
-
//#endregion
|
|
233
|
-
//#region ../alepha/src/core/providers/SchemaCodec.d.ts
|
|
234
|
-
declare abstract class SchemaCodec {
|
|
235
|
-
/**
|
|
236
|
-
* Encode the value to a string format.
|
|
237
|
-
*/
|
|
238
|
-
abstract encodeToString<T extends TSchema$1>(schema: T, value: Static$1<T>): string;
|
|
239
|
-
/**
|
|
240
|
-
* Encode the value to a binary format.
|
|
241
|
-
*/
|
|
242
|
-
abstract encodeToBinary<T extends TSchema$1>(schema: T, value: Static$1<T>): Uint8Array;
|
|
243
|
-
/**
|
|
244
|
-
* Decode string, binary, or other formats to the schema type.
|
|
245
|
-
*/
|
|
246
|
-
abstract decode<T>(schema: TSchema$1, value: unknown): T;
|
|
247
|
-
}
|
|
248
|
-
//#endregion
|
|
249
|
-
//#region ../alepha/src/core/providers/JsonSchemaCodec.d.ts
|
|
250
|
-
declare class JsonSchemaCodec extends SchemaCodec {
|
|
251
|
-
protected readonly json: Json;
|
|
252
|
-
protected readonly encoder: TextEncoder;
|
|
253
|
-
protected readonly decoder: TextDecoder;
|
|
254
|
-
encodeToString<T extends TSchema>(schema: T, value: Static$1<T>): string;
|
|
255
|
-
encodeToBinary<T extends TSchema>(schema: T, value: Static$1<T>): Uint8Array;
|
|
256
|
-
decode<T>(schema: TSchema, value: unknown): T;
|
|
257
|
-
}
|
|
258
|
-
//#endregion
|
|
259
|
-
//#region ../alepha/src/core/primitives/$hook.d.ts
|
|
260
|
-
interface HookOptions<T extends keyof Hooks> {
|
|
261
|
-
/**
|
|
262
|
-
* The name of the hook. "configure", "start", "ready", "stop", ...
|
|
263
|
-
*/
|
|
264
|
-
on: T;
|
|
265
|
-
/**
|
|
266
|
-
* The handler to run when the hook is triggered.
|
|
267
|
-
*/
|
|
268
|
-
handler: (args: Hooks[T]) => Async<any>;
|
|
269
|
-
/**
|
|
270
|
-
* Force the hook to run first or last on the list of hooks.
|
|
271
|
-
*/
|
|
272
|
-
priority?: "first" | "last";
|
|
273
|
-
/**
|
|
274
|
-
* Empty placeholder, not implemented yet. :-)
|
|
275
|
-
*/
|
|
276
|
-
before?: object | Array<object>;
|
|
277
|
-
/**
|
|
278
|
-
* Empty placeholder, not implemented yet. :-)
|
|
279
|
-
*/
|
|
280
|
-
after?: object | Array<object>;
|
|
281
|
-
}
|
|
282
|
-
declare class HookPrimitive<T extends keyof Hooks> extends Primitive<HookOptions<T>> {
|
|
283
|
-
called: number;
|
|
284
|
-
protected onInit(): void;
|
|
285
|
-
}
|
|
286
|
-
//#endregion
|
|
287
|
-
//#region ../alepha/src/core/providers/SchemaValidator.d.ts
|
|
288
|
-
declare class SchemaValidator {
|
|
289
|
-
protected cache: Map<TSchema, Validator<typebox3.TProperties, TSchema, unknown, unknown>>;
|
|
290
|
-
protected useEval: boolean;
|
|
291
|
-
/**
|
|
292
|
-
* Validate the value against the provided schema.
|
|
293
|
-
*
|
|
294
|
-
* Validation create a new value by applying some preprocessing. (e.g., trimming text)
|
|
295
|
-
*/
|
|
296
|
-
validate<T extends TSchema>(schema: T, value: unknown, options?: ValidateOptions): Static$1<T>;
|
|
297
|
-
protected getValidator<T extends TSchema>(schema: T): Validator<{}, T>;
|
|
298
|
-
/**
|
|
299
|
-
* Preprocess the value based on the schema before validation.
|
|
300
|
-
*
|
|
301
|
-
* - If the value is `null` and the schema does not allow `null`, it converts it to `undefined`.
|
|
302
|
-
* - If the value is a string and the schema has a `~options.trim` flag, it trims whitespace from the string.
|
|
303
|
-
*/
|
|
304
|
-
beforeParse(schema: any, value: any, options: ValidateOptions): any;
|
|
305
|
-
/**
|
|
306
|
-
* Used by `beforeParse` to determine if a schema allows null values.
|
|
307
|
-
*/
|
|
308
|
-
protected isSchemaNullable: (schema: any) => boolean;
|
|
309
|
-
protected onConfigure: HookPrimitive<"configure">;
|
|
310
|
-
protected canEval(): boolean;
|
|
311
|
-
}
|
|
312
|
-
interface ValidateOptions {
|
|
313
|
-
trim?: boolean;
|
|
314
|
-
nullToUndefined?: boolean;
|
|
315
|
-
deleteUndefined?: boolean;
|
|
316
|
-
}
|
|
317
|
-
//#endregion
|
|
318
|
-
//#region ../alepha/src/core/providers/CodecManager.d.ts
|
|
319
|
-
type Encoding = "object" | "string" | "binary";
|
|
320
|
-
interface EncodeOptions<T extends Encoding = Encoding> {
|
|
321
|
-
/**
|
|
322
|
-
* The output encoding format:
|
|
323
|
-
* - 'string': Returns JSON string
|
|
324
|
-
* - 'binary': Returns Uint8Array (for protobuf, msgpack, etc.)
|
|
325
|
-
*
|
|
326
|
-
* @default "string"
|
|
327
|
-
*/
|
|
328
|
-
as?: T;
|
|
329
|
-
/**
|
|
330
|
-
* The encoder to use (e.g., 'json', 'protobuf', 'msgpack')
|
|
331
|
-
*
|
|
332
|
-
* @default "json"
|
|
333
|
-
*/
|
|
334
|
-
encoder?: string;
|
|
335
|
-
/**
|
|
336
|
-
* Validation options to apply before encoding.
|
|
337
|
-
*/
|
|
338
|
-
validation?: ValidateOptions | false;
|
|
339
|
-
}
|
|
340
|
-
type EncodeResult<T extends TSchema, E extends Encoding> = E extends "string" ? string : E extends "binary" ? Uint8Array : StaticEncode<T>;
|
|
341
|
-
interface DecodeOptions {
|
|
342
|
-
/**
|
|
343
|
-
* The encoder to use (e.g., 'json', 'protobuf', 'msgpack')
|
|
344
|
-
*
|
|
345
|
-
* @default "json"
|
|
346
|
-
*/
|
|
347
|
-
encoder?: string;
|
|
348
|
-
/**
|
|
349
|
-
* Validation options to apply before encoding.
|
|
350
|
-
*/
|
|
351
|
-
validation?: ValidateOptions | false;
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* CodecManager manages multiple codec formats and provides a unified interface
|
|
355
|
-
* for encoding and decoding data with different formats.
|
|
356
|
-
*/
|
|
357
|
-
declare class CodecManager {
|
|
358
|
-
protected readonly codecs: Map<string, SchemaCodec>;
|
|
359
|
-
protected readonly jsonCodec: JsonSchemaCodec;
|
|
360
|
-
protected readonly schemaValidator: SchemaValidator;
|
|
361
|
-
default: string;
|
|
362
|
-
constructor();
|
|
363
|
-
/**
|
|
364
|
-
* Register a new codec format.
|
|
365
|
-
*
|
|
366
|
-
* @param name - The name of the codec (e.g., 'json', 'protobuf')
|
|
367
|
-
* @param codec - The codec implementation
|
|
368
|
-
*/
|
|
369
|
-
register(name: string, codec: SchemaCodec): void;
|
|
370
|
-
/**
|
|
371
|
-
* Get a specific codec by name.
|
|
372
|
-
*
|
|
373
|
-
* @param name - The name of the codec
|
|
374
|
-
* @returns The codec instance
|
|
375
|
-
* @throws {AlephaError} If the codec is not found
|
|
376
|
-
*/
|
|
377
|
-
getCodec(name: string): SchemaCodec;
|
|
378
|
-
/**
|
|
379
|
-
* Encode data using the specified codec and output format.
|
|
380
|
-
*/
|
|
381
|
-
encode<T extends TSchema, E extends Encoding = "object">(schema: T, value: unknown, options?: EncodeOptions<E>): EncodeResult<T, E>;
|
|
382
|
-
/**
|
|
383
|
-
* Decode data using the specified codec.
|
|
384
|
-
*/
|
|
385
|
-
decode<T extends TSchema>(schema: T, data: any, options?: DecodeOptions): Static$1<T>;
|
|
386
|
-
/**
|
|
387
|
-
* Validate decoded data against the schema.
|
|
388
|
-
*
|
|
389
|
-
* This is automatically called before encoding or after decoding.
|
|
390
|
-
*/
|
|
391
|
-
validate<T extends TSchema>(schema: T, value: unknown, options?: ValidateOptions): Static$1<T>;
|
|
392
|
-
}
|
|
393
|
-
//#endregion
|
|
394
|
-
//#region ../alepha/src/core/providers/EventManager.d.ts
|
|
395
|
-
declare class EventManager {
|
|
396
|
-
logFn?: () => LoggerInterface | undefined;
|
|
397
|
-
/**
|
|
398
|
-
* List of events that can be triggered. Powered by $hook().
|
|
399
|
-
*/
|
|
400
|
-
protected events: Record<string, Array<Hook>>;
|
|
401
|
-
constructor(logFn?: () => LoggerInterface | undefined);
|
|
402
|
-
protected get log(): LoggerInterface | undefined;
|
|
403
|
-
clear(): void;
|
|
404
|
-
/**
|
|
405
|
-
* Registers a hook for the specified event.
|
|
406
|
-
*/
|
|
407
|
-
on<T extends keyof Hooks>(event: T, hookOrFunc: Hook<T> | ((payload: Hooks[T]) => Async<void>)): () => void;
|
|
408
|
-
/**
|
|
409
|
-
* Emits the specified event with the given payload.
|
|
410
|
-
*/
|
|
411
|
-
emit<T extends keyof Hooks>(func: T, payload: Hooks[T], options?: {
|
|
412
|
-
/**
|
|
413
|
-
* If true, the hooks will be executed in reverse order.
|
|
414
|
-
* This is useful for "stop" hooks that should be executed in reverse order.
|
|
415
|
-
*
|
|
416
|
-
* @default false
|
|
417
|
-
*/
|
|
418
|
-
reverse?: boolean;
|
|
419
|
-
/**
|
|
420
|
-
* If true, the hooks will be logged with their execution time.
|
|
421
|
-
*
|
|
422
|
-
* @default false
|
|
423
|
-
*/
|
|
424
|
-
log?: boolean;
|
|
425
|
-
/**
|
|
426
|
-
* If true, errors will be caught and logged instead of throwing.
|
|
427
|
-
*
|
|
428
|
-
* @default false
|
|
429
|
-
*/
|
|
430
|
-
catch?: boolean;
|
|
431
|
-
}): Promise<void>;
|
|
432
|
-
}
|
|
433
|
-
//#endregion
|
|
434
|
-
//#region ../alepha/src/core/providers/StateManager.d.ts
|
|
435
|
-
interface AtomWithValue {
|
|
436
|
-
atom: Atom;
|
|
437
|
-
value: unknown;
|
|
438
|
-
}
|
|
439
|
-
declare class StateManager<State$1 extends object = State> {
|
|
440
|
-
protected readonly als: AlsProvider;
|
|
441
|
-
protected readonly events: EventManager;
|
|
442
|
-
protected readonly codec: JsonSchemaCodec;
|
|
443
|
-
protected readonly atoms: Map<keyof State$1, Atom<TObject<typebox3.TProperties>, string>>;
|
|
444
|
-
protected store: Partial<State$1>;
|
|
445
|
-
constructor(store?: Partial<State$1>);
|
|
446
|
-
getAtoms(context?: boolean): Array<AtomWithValue>;
|
|
447
|
-
register(atom: Atom<any>): this;
|
|
448
|
-
/**
|
|
449
|
-
* Get a value from the state with proper typing
|
|
450
|
-
*/
|
|
451
|
-
get<T extends TAtomObject>(target: Atom<T>): Static$1<T>;
|
|
452
|
-
get<Key extends keyof State$1>(target: Key): State$1[Key] | undefined;
|
|
453
|
-
/**
|
|
454
|
-
* Set a value in the state
|
|
455
|
-
*/
|
|
456
|
-
set<T extends TAtomObject>(target: Atom<T>, value: AtomStatic<T>, options?: SetStateOptions): this;
|
|
457
|
-
set<Key extends keyof State$1>(target: Key, value: State$1[Key] | undefined, options?: SetStateOptions): this;
|
|
458
|
-
/**
|
|
459
|
-
* Mutate a value in the state.
|
|
460
|
-
*/
|
|
461
|
-
mut<T extends TObject>(target: Atom<T>, mutator: (current: Static$1<T>) => Static$1<T>): this;
|
|
462
|
-
mut<Key extends keyof State$1>(target: Key, mutator: (current: State$1[Key] | undefined) => State$1[Key] | undefined): this;
|
|
463
|
-
/**
|
|
464
|
-
* Check if a key exists in the state
|
|
465
|
-
*/
|
|
466
|
-
has<Key extends keyof State$1>(key: Key): boolean;
|
|
467
|
-
/**
|
|
468
|
-
* Delete a key from the state (set to undefined)
|
|
469
|
-
*/
|
|
470
|
-
del<Key extends keyof State$1>(key: Key): this;
|
|
471
|
-
/**
|
|
472
|
-
* Push a value to an array in the state
|
|
473
|
-
*/
|
|
474
|
-
push<Key extends keyof OnlyArray<State$1>>(key: Key, ...value: Array<NonNullable<State$1[Key]> extends Array<infer U> ? U : never>): this;
|
|
475
|
-
/**
|
|
476
|
-
* Clear all state
|
|
477
|
-
*/
|
|
478
|
-
clear(): this;
|
|
479
|
-
/**
|
|
480
|
-
* Get all keys that exist in the state
|
|
481
|
-
*/
|
|
482
|
-
keys(): (keyof State$1)[];
|
|
483
|
-
}
|
|
484
|
-
type OnlyArray<T extends object> = { [K in keyof T]: NonNullable<T[K]> extends Array<any> ? K : never };
|
|
485
|
-
interface SetStateOptions {
|
|
486
|
-
skipContext?: boolean;
|
|
487
|
-
skipEvents?: boolean;
|
|
488
|
-
}
|
|
489
|
-
//#endregion
|
|
490
|
-
//#region ../alepha/src/core/Alepha.d.ts
|
|
491
|
-
/**
|
|
492
|
-
* Core container of the Alepha framework.
|
|
493
|
-
*
|
|
494
|
-
* It is responsible for managing the lifecycle of services,
|
|
495
|
-
* handling dependency injection,
|
|
496
|
-
* and providing a unified interface for the application.
|
|
497
|
-
*
|
|
498
|
-
* @example
|
|
499
|
-
* ```ts
|
|
500
|
-
* import { Alepha, run } from "alepha";
|
|
501
|
-
*
|
|
502
|
-
* class MyService {
|
|
503
|
-
* // business logic here
|
|
504
|
-
* }
|
|
505
|
-
*
|
|
506
|
-
* const alepha = Alepha.create({
|
|
507
|
-
* // state, env, and other properties
|
|
508
|
-
* })
|
|
509
|
-
*
|
|
510
|
-
* alepha.with(MyService);
|
|
511
|
-
*
|
|
512
|
-
* run(alepha); // trigger .start (and .stop) automatically
|
|
513
|
-
* ```
|
|
514
|
-
*
|
|
515
|
-
* ### Alepha Factory
|
|
516
|
-
*
|
|
517
|
-
* Alepha.create() is an enhanced version of new Alepha().
|
|
518
|
-
* - It merges `process.env` with the provided state.env when available.
|
|
519
|
-
* - It populates the test hooks for Vitest or Jest environments when available.
|
|
520
|
-
*
|
|
521
|
-
* new Alepha() is fine if you don't need these helpers.
|
|
522
|
-
*
|
|
523
|
-
* ### Platforms & Environments
|
|
524
|
-
*
|
|
525
|
-
* Alepha is designed to work in various environments:
|
|
526
|
-
* - **Browser**: Runs in the browser, using the global `window` object.
|
|
527
|
-
* - **Serverless**: Runs in serverless environments like Vercel or Vite.
|
|
528
|
-
* - **Test**: Runs in test environments like Jest or Vitest.
|
|
529
|
-
* - **Production**: Runs in production environments, typically with NODE_ENV set to "production".
|
|
530
|
-
* * You can check the current environment using the following methods:
|
|
531
|
-
*
|
|
532
|
-
* - `isBrowser()`: Returns true if the App is running in a browser environment.
|
|
533
|
-
* - `isServerless()`: Returns true if the App is running in a serverless environment.
|
|
534
|
-
* - `isTest()`: Returns true if the App is running in a test environment.
|
|
535
|
-
* - `isProduction()`: Returns true if the App is running in a production environment.
|
|
536
|
-
*
|
|
537
|
-
* ### State & Environment
|
|
538
|
-
*
|
|
539
|
-
* The state of the Alepha container is stored in the `store` property.
|
|
540
|
-
* Most important property is `store.env`, which contains the environment variables.
|
|
541
|
-
*
|
|
542
|
-
* ```ts
|
|
543
|
-
* const alepha = Alepha.create({ env: { MY_VAR: "value" } });
|
|
544
|
-
*
|
|
545
|
-
* // You can access the environment variables using alepha.env
|
|
546
|
-
* console.log(alepha.env.MY_VAR); // "value"
|
|
547
|
-
*
|
|
548
|
-
* // But you should use $env() primitive to get typed values from the environment.
|
|
549
|
-
* class App {
|
|
550
|
-
* env = $env(
|
|
551
|
-
* t.object({
|
|
552
|
-
* MY_VAR: t.text(),
|
|
553
|
-
* })
|
|
554
|
-
* );
|
|
555
|
-
* }
|
|
556
|
-
* ```
|
|
557
|
-
*
|
|
558
|
-
* ### Modules
|
|
559
|
-
*
|
|
560
|
-
* Modules are a way to group services together.
|
|
561
|
-
* You can register a module using the `$module` primitive.
|
|
562
|
-
*
|
|
563
|
-
* ```ts
|
|
564
|
-
* import { $module } from "alepha";
|
|
565
|
-
*
|
|
566
|
-
* class MyLib {}
|
|
567
|
-
*
|
|
568
|
-
* const myModule = $module({
|
|
569
|
-
* name: "my.project.module",
|
|
570
|
-
* services: [MyLib],
|
|
571
|
-
* });
|
|
572
|
-
* ```
|
|
573
|
-
*
|
|
574
|
-
* Do not use modules for small applications.
|
|
575
|
-
*
|
|
576
|
-
* ### Hooks
|
|
577
|
-
*
|
|
578
|
-
* Hooks are a way to run async functions from all registered providers/services.
|
|
579
|
-
* You can register a hook using the `$hook` primitive.
|
|
580
|
-
*
|
|
581
|
-
* ```ts
|
|
582
|
-
* import { $hook } from "alepha";
|
|
583
|
-
*
|
|
584
|
-
* class App {
|
|
585
|
-
* log = $logger();
|
|
586
|
-
* onCustomerHook = $hook({
|
|
587
|
-
* on: "my:custom:hook",
|
|
588
|
-
* handler: () => {
|
|
589
|
-
* this.log?.info("App is being configured");
|
|
590
|
-
* },
|
|
591
|
-
* });
|
|
592
|
-
* }
|
|
593
|
-
*
|
|
594
|
-
* Alepha.create()
|
|
595
|
-
* .with(App)
|
|
596
|
-
* .start()
|
|
597
|
-
* .then(alepha => alepha.events.emit("my:custom:hook"));
|
|
598
|
-
* ```
|
|
599
|
-
*
|
|
600
|
-
* Hooks are fully typed. You can create your own hooks by using module augmentation:
|
|
601
|
-
*
|
|
602
|
-
* ```ts
|
|
603
|
-
* declare module "alepha" {
|
|
604
|
-
* interface Hooks {
|
|
605
|
-
* "my:custom:hook": {
|
|
606
|
-
* arg1: string;
|
|
607
|
-
* }
|
|
608
|
-
* }
|
|
609
|
-
* }
|
|
610
|
-
* ```
|
|
611
|
-
*
|
|
612
|
-
* @module alepha
|
|
613
|
-
*/
|
|
614
|
-
declare class Alepha {
|
|
615
|
-
/**
|
|
616
|
-
* Creates a new instance of the Alepha container with some helpers:
|
|
617
|
-
*
|
|
618
|
-
* - merges `process.env` with the provided state.env when available.
|
|
619
|
-
* - populates the test hooks for Vitest or Jest environments when available.
|
|
620
|
-
*
|
|
621
|
-
* If you are not interested about these helpers, you can use the constructor directly.
|
|
622
|
-
*/
|
|
623
|
-
static create(state?: Partial<State>): Alepha;
|
|
624
|
-
/**
|
|
625
|
-
* Flag indicating whether the App won't accept any further changes.
|
|
626
|
-
* Pass to true when #start() is called.
|
|
627
|
-
*/
|
|
628
|
-
protected locked: boolean;
|
|
629
|
-
/**
|
|
630
|
-
* True if the App has been configured.
|
|
631
|
-
*/
|
|
632
|
-
protected configured: boolean;
|
|
633
|
-
/**
|
|
634
|
-
* True if the App has started.
|
|
635
|
-
*/
|
|
636
|
-
protected started: boolean;
|
|
637
|
-
/**
|
|
638
|
-
* True if the App is ready.
|
|
639
|
-
*/
|
|
640
|
-
protected ready: boolean;
|
|
641
|
-
/**
|
|
642
|
-
* A promise that resolves when the App has started.
|
|
643
|
-
*/
|
|
644
|
-
protected starting?: PromiseWithResolvers<this>;
|
|
645
|
-
/**
|
|
646
|
-
* During the instantiation process, we keep a list of pending instantiations.
|
|
647
|
-
* > It allows us to detect circular dependencies.
|
|
648
|
-
*/
|
|
649
|
-
protected pendingInstantiations: Service[];
|
|
650
|
-
/**
|
|
651
|
-
* Cache for environment variables.
|
|
652
|
-
* > It allows us to avoid parsing the same schema multiple times.
|
|
653
|
-
*/
|
|
654
|
-
protected cacheEnv: Map<TSchema$1, any>;
|
|
655
|
-
/**
|
|
656
|
-
* List of modules that are registered in the container.
|
|
657
|
-
*
|
|
658
|
-
* Modules are used to group services and provide a way to register them in the container.
|
|
659
|
-
*/
|
|
660
|
-
protected modules: Array<Module>;
|
|
661
|
-
/**
|
|
662
|
-
* List of service substitutions.
|
|
663
|
-
*
|
|
664
|
-
* Services registered here will be replaced by the specified service when injected.
|
|
665
|
-
*/
|
|
666
|
-
protected substitutions: Map<Service, {
|
|
667
|
-
use: Service;
|
|
668
|
-
}>;
|
|
669
|
-
/**
|
|
670
|
-
* Registry of primitives.
|
|
671
|
-
*/
|
|
672
|
-
protected primitiveRegistry: Map<Service<Primitive<{}>>, Primitive<{}>[]>;
|
|
673
|
-
/**
|
|
674
|
-
* List of all services + how they are provided.
|
|
675
|
-
*/
|
|
676
|
-
protected registry: Map<Service, ServiceDefinition>;
|
|
677
|
-
/**
|
|
678
|
-
* Node.js feature that allows to store context across asynchronous calls.
|
|
679
|
-
*
|
|
680
|
-
* This is used for logging, tracing, and other context-related features.
|
|
681
|
-
*
|
|
682
|
-
* Mocked for browser environments.
|
|
683
|
-
*/
|
|
684
|
-
context: AlsProvider;
|
|
685
|
-
/**
|
|
686
|
-
* Event manager to handle lifecycle events and custom events.
|
|
687
|
-
*/
|
|
688
|
-
events: EventManager;
|
|
689
|
-
/**
|
|
690
|
-
* State manager to store arbitrary values.
|
|
691
|
-
*/
|
|
692
|
-
store: StateManager<State>;
|
|
693
|
-
/**
|
|
694
|
-
* Codec manager for encoding and decoding data with different formats.
|
|
695
|
-
*
|
|
696
|
-
* Supports multiple codec formats (JSON, Protobuf, etc.) with a unified interface.
|
|
697
|
-
*/
|
|
698
|
-
codec: CodecManager;
|
|
699
|
-
/**
|
|
700
|
-
* Get logger instance.
|
|
701
|
-
*/
|
|
702
|
-
get log(): LoggerInterface | undefined;
|
|
703
|
-
/**
|
|
704
|
-
* The environment variables for the App.
|
|
705
|
-
*/
|
|
706
|
-
get env(): Readonly<Env>;
|
|
707
|
-
constructor(state?: Partial<State>);
|
|
708
|
-
set<T extends TAtomObject>(target: Atom<T>, value: AtomStatic<T>): this;
|
|
709
|
-
set<Key extends keyof State>(target: Key, value: State[Key] | undefined): this;
|
|
710
|
-
/**
|
|
711
|
-
* True when start() is called.
|
|
712
|
-
*
|
|
713
|
-
* -> No more services can be added, it's over, bye!
|
|
714
|
-
*/
|
|
715
|
-
isLocked(): boolean;
|
|
716
|
-
/**
|
|
717
|
-
* Returns whether the App is configured.
|
|
718
|
-
*
|
|
719
|
-
* It means that Alepha#configure() has been called.
|
|
720
|
-
*
|
|
721
|
-
* > By default, configure() is called automatically when start() is called, but you can also call it manually.
|
|
722
|
-
*/
|
|
723
|
-
isConfigured(): boolean;
|
|
724
|
-
/**
|
|
725
|
-
* Returns whether the App has started.
|
|
726
|
-
*
|
|
727
|
-
* It means that #start() has been called but maybe not all services are ready.
|
|
728
|
-
*/
|
|
729
|
-
isStarted(): boolean;
|
|
730
|
-
/**
|
|
731
|
-
* True if the App is ready. It means that Alepha is started AND ready() hook has beed called.
|
|
732
|
-
*/
|
|
733
|
-
isReady(): boolean;
|
|
734
|
-
/**
|
|
735
|
-
* True if the App is running in a Continuous Integration environment.
|
|
736
|
-
*/
|
|
737
|
-
isCI(): boolean;
|
|
738
|
-
/**
|
|
739
|
-
* True if the App is running in a browser environment.
|
|
740
|
-
*/
|
|
741
|
-
isBrowser(): boolean;
|
|
742
|
-
/**
|
|
743
|
-
* Returns whether the App is running in Vite dev mode.
|
|
744
|
-
*/
|
|
745
|
-
isViteDev(): boolean;
|
|
746
|
-
isBun(): boolean;
|
|
747
|
-
/**
|
|
748
|
-
* Returns whether the App is running in a serverless environment.
|
|
749
|
-
*/
|
|
750
|
-
isServerless(): boolean;
|
|
751
|
-
/**
|
|
752
|
-
* Returns whether the App is in test mode. (Running in a test environment)
|
|
753
|
-
*
|
|
754
|
-
* > This is automatically set when running tests with Jest or Vitest.
|
|
755
|
-
*/
|
|
756
|
-
isTest(): boolean;
|
|
757
|
-
/**
|
|
758
|
-
* Returns whether the App is in production mode. (Running in a production environment)
|
|
759
|
-
*
|
|
760
|
-
* > This is automatically set by Vite or Vercel. However, you have to set it manually when running Docker apps.
|
|
761
|
-
*/
|
|
762
|
-
isProduction(): boolean;
|
|
763
|
-
/**
|
|
764
|
-
* Starts the App.
|
|
765
|
-
*
|
|
766
|
-
* - Lock any further changes to the container.
|
|
767
|
-
* - Run "configure" hook for all services. Primitives will be processed.
|
|
768
|
-
* - Run "start" hook for all services. Providers will connect/listen/...
|
|
769
|
-
* - Run "ready" hook for all services. This is the point where the App is ready to serve requests.
|
|
770
|
-
*
|
|
771
|
-
* @return A promise that resolves when the App has started.
|
|
772
|
-
*/
|
|
773
|
-
start(): Promise<this>;
|
|
774
|
-
/**
|
|
775
|
-
* Stops the App.
|
|
776
|
-
*
|
|
777
|
-
* - Run "stop" hook for all services.
|
|
778
|
-
*
|
|
779
|
-
* Stop will NOT reset the container.
|
|
780
|
-
* Stop will NOT unlock the container.
|
|
781
|
-
*
|
|
782
|
-
* > Stop is used to gracefully shut down the application, nothing more. There is no "restart".
|
|
783
|
-
*
|
|
784
|
-
* @return A promise that resolves when the App has stopped.
|
|
785
|
-
*/
|
|
786
|
-
stop(): Promise<void>;
|
|
787
|
-
/**
|
|
788
|
-
* Check if entry is registered in the container.
|
|
789
|
-
*/
|
|
790
|
-
has(entry: ServiceEntry, opts?: {
|
|
791
|
-
/**
|
|
792
|
-
* Check if the entry is registered in the pending instantiation stack.
|
|
793
|
-
*
|
|
794
|
-
* @default true
|
|
795
|
-
*/
|
|
796
|
-
inStack?: boolean;
|
|
797
|
-
/**
|
|
798
|
-
* Check if the entry is registered in the container registry.
|
|
799
|
-
*
|
|
800
|
-
* @default true
|
|
801
|
-
*/
|
|
802
|
-
inRegistry?: boolean;
|
|
803
|
-
/**
|
|
804
|
-
* Check if the entry is registered in the substitutions.
|
|
805
|
-
*
|
|
806
|
-
* @default true
|
|
807
|
-
*/
|
|
808
|
-
inSubstitutions?: boolean;
|
|
809
|
-
/**
|
|
810
|
-
* Where to look for registered services.
|
|
811
|
-
*
|
|
812
|
-
* @default this.registry
|
|
813
|
-
*/
|
|
814
|
-
registry?: Map<Service, ServiceDefinition>;
|
|
815
|
-
}): boolean;
|
|
816
|
-
/**
|
|
817
|
-
* Registers the specified service in the container.
|
|
818
|
-
*
|
|
819
|
-
* - If the service is ALREADY registered, the method does nothing.
|
|
820
|
-
* - If the service is NOT registered, a new instance is created and registered.
|
|
821
|
-
*
|
|
822
|
-
* Method is chainable, so you can register multiple services in a single call.
|
|
823
|
-
*
|
|
824
|
-
* > ServiceEntry allows to provide a service **substitution** feature.
|
|
825
|
-
*
|
|
826
|
-
* @example
|
|
827
|
-
* ```ts
|
|
828
|
-
* class A { value = "a"; }
|
|
829
|
-
* class B { value = "b"; }
|
|
830
|
-
* class M { a = $inject(A); }
|
|
831
|
-
*
|
|
832
|
-
* Alepha.create().with({ provide: A, use: B }).get(M).a.value; // "b"
|
|
833
|
-
* ```
|
|
834
|
-
*
|
|
835
|
-
* > **Substitution** is an advanced feature that allows you to replace a service with another service.
|
|
836
|
-
* > It's useful for testing or for providing different implementations of a service.
|
|
837
|
-
* > If you are interested in configuring a service, use Alepha#configure() instead.
|
|
838
|
-
*
|
|
839
|
-
* @param serviceEntry - The service to register in the container.
|
|
840
|
-
* @return Current instance of Alepha.
|
|
841
|
-
*/
|
|
842
|
-
with<T extends object>(serviceEntry: ServiceEntry<T> | {
|
|
843
|
-
default: ServiceEntry<T>;
|
|
844
|
-
}): this;
|
|
845
|
-
/**
|
|
846
|
-
* Get an instance of the specified service from the container.
|
|
847
|
-
*
|
|
848
|
-
* @see {@link InjectOptions} for the available options.
|
|
849
|
-
*/
|
|
850
|
-
inject<T extends object>(service: Service<T> | string, opts?: InjectOptions<T>): T;
|
|
851
|
-
/**
|
|
852
|
-
* Applies environment variables to the provided schema and state object.
|
|
853
|
-
*
|
|
854
|
-
* It replaces also all templated $ENV inside string values.
|
|
855
|
-
*
|
|
856
|
-
* @param schema - The schema object to apply environment variables to.
|
|
857
|
-
* @return The schema object with environment variables applied.
|
|
858
|
-
*/
|
|
859
|
-
parseEnv<T extends TObject>(schema: T): Static<T>;
|
|
860
|
-
/**
|
|
861
|
-
* Get all environment variable schemas and their parsed values.
|
|
862
|
-
*
|
|
863
|
-
* This is useful for DevTools to display all expected environment variables.
|
|
864
|
-
*/
|
|
865
|
-
getEnvSchemas(): Array<{
|
|
866
|
-
schema: TSchema$1;
|
|
867
|
-
values: Record<string, any>;
|
|
868
|
-
}>;
|
|
869
|
-
/**
|
|
870
|
-
* Dump the current dependency graph of the App.
|
|
871
|
-
*
|
|
872
|
-
* This method returns a record where the keys are the names of the services.
|
|
873
|
-
*/
|
|
874
|
-
graph(): Record<string, {
|
|
875
|
-
from: string[];
|
|
876
|
-
as?: string[];
|
|
877
|
-
module?: string;
|
|
878
|
-
}>;
|
|
879
|
-
dump(): AlephaDump;
|
|
880
|
-
services<T extends object>(base: Service<T>): Array<T>;
|
|
881
|
-
/**
|
|
882
|
-
* Get all primitives of the specified type.
|
|
883
|
-
*/
|
|
884
|
-
primitives<TPrimitive extends Primitive>(factory: {
|
|
885
|
-
[KIND]: InstantiableClass<TPrimitive>;
|
|
886
|
-
} | string): Array<TPrimitive>;
|
|
887
|
-
protected new<T extends object>(service: Service<T>, args?: any[]): T;
|
|
888
|
-
protected processPrimitive(value: Primitive, propertyKey?: string): void;
|
|
889
|
-
}
|
|
890
|
-
interface Hook<T extends keyof Hooks = any> {
|
|
891
|
-
caller?: Service;
|
|
892
|
-
priority?: "first" | "last";
|
|
893
|
-
callback: (payload: Hooks[T]) => Async<void>;
|
|
894
|
-
}
|
|
895
|
-
interface AlephaDump {
|
|
896
|
-
env: Record<string, AlephaDumpEnvVariable>;
|
|
897
|
-
providers: Record<string, {
|
|
898
|
-
from: string[];
|
|
899
|
-
as?: string[];
|
|
900
|
-
module?: string;
|
|
901
|
-
}>;
|
|
902
|
-
}
|
|
903
|
-
interface AlephaDumpEnvVariable {
|
|
904
|
-
description: string;
|
|
905
|
-
default?: string;
|
|
906
|
-
required?: boolean;
|
|
907
|
-
enum?: Array<string>;
|
|
908
|
-
}
|
|
909
|
-
/**
|
|
910
|
-
* This is how we store services in the Alepha container.
|
|
911
|
-
*/
|
|
912
|
-
interface ServiceDefinition<T extends object = any> {
|
|
913
|
-
/**
|
|
914
|
-
* The instance of the class or type definition.
|
|
915
|
-
* Mostly used for caching / singleton but can be used for other purposes like forcing the instance.
|
|
916
|
-
*/
|
|
917
|
-
instance: T;
|
|
918
|
-
/**
|
|
919
|
-
* List of classes which use this class.
|
|
920
|
-
*/
|
|
921
|
-
parents: Array<Service | null>;
|
|
922
|
-
}
|
|
923
|
-
interface Env {
|
|
924
|
-
[key: string]: string | boolean | number | undefined;
|
|
925
|
-
/**
|
|
926
|
-
* Optional environment variable that indicates the current environment.
|
|
927
|
-
*/
|
|
928
|
-
NODE_ENV?: string;
|
|
929
|
-
/**
|
|
930
|
-
* Optional name of the application.
|
|
931
|
-
*/
|
|
932
|
-
APP_NAME?: string;
|
|
933
|
-
/**
|
|
934
|
-
* Optional root module name.
|
|
935
|
-
*/
|
|
936
|
-
MODULE_NAME?: string;
|
|
937
|
-
}
|
|
938
|
-
interface State {
|
|
939
|
-
/**
|
|
940
|
-
* Environment variables for the application.
|
|
941
|
-
*/
|
|
942
|
-
env?: Readonly<Env>;
|
|
943
|
-
/**
|
|
944
|
-
* Logger instance to be used by the Alepha container.
|
|
945
|
-
*
|
|
946
|
-
* @internal
|
|
947
|
-
*/
|
|
948
|
-
"alepha.logger"?: LoggerInterface;
|
|
949
|
-
/**
|
|
950
|
-
* If defined, the Alepha container will only register this service and its dependencies.
|
|
951
|
-
*
|
|
952
|
-
* @example
|
|
953
|
-
* ```ts
|
|
954
|
-
* class MigrateCmd {
|
|
955
|
-
* db = $inject(DatabaseProvider);
|
|
956
|
-
* alepha = $inject(Alepha);
|
|
957
|
-
* env = $env(
|
|
958
|
-
* t.object({
|
|
959
|
-
* MIGRATE: t.optional(t.boolean()),
|
|
960
|
-
* }),
|
|
961
|
-
* );
|
|
962
|
-
*
|
|
963
|
-
* constructor() {
|
|
964
|
-
* if (this.env.MIGRATE) {
|
|
965
|
-
* this.alepha.set("alepha.target", MigrateCmd);
|
|
966
|
-
* }
|
|
967
|
-
* }
|
|
968
|
-
*
|
|
969
|
-
* ready = $hook({
|
|
970
|
-
* on: "ready",
|
|
971
|
-
* handler: async () => {
|
|
972
|
-
* if (this.env.MIGRATE) {
|
|
973
|
-
* await this.db.migrate();
|
|
974
|
-
* }
|
|
975
|
-
* },
|
|
976
|
-
* });
|
|
977
|
-
* }
|
|
978
|
-
* ```
|
|
979
|
-
*/
|
|
980
|
-
"alepha.target"?: Service;
|
|
981
|
-
/**
|
|
982
|
-
* Bind to Vitest 'beforeAll' hook.
|
|
983
|
-
* Used for testing purposes.
|
|
984
|
-
* This is automatically attached if Alepha#create() detects a test environment and global 'beforeAll' is available.
|
|
985
|
-
*/
|
|
986
|
-
"alepha.test.beforeAll"?: (run: any) => any;
|
|
987
|
-
/**
|
|
988
|
-
* Bind to Vitest 'afterAll' hook.
|
|
989
|
-
* Used for testing purposes.
|
|
990
|
-
* This is automatically attached if Alepha#create() detects a test environment and global 'afterAll' is available.
|
|
991
|
-
*/
|
|
992
|
-
"alepha.test.afterAll"?: (run: any) => any;
|
|
993
|
-
/**
|
|
994
|
-
* Bind to Vitest 'afterEach' hook.
|
|
995
|
-
* Used for testing purposes.
|
|
996
|
-
* This is automatically attached if Alepha#create() detects a test environment and global 'afterEach' is available.
|
|
997
|
-
*/
|
|
998
|
-
"alepha.test.afterEach"?: (run: any) => any;
|
|
999
|
-
/**
|
|
1000
|
-
* Bind to Vitest 'onTestFinished' hook.
|
|
1001
|
-
* Used for testing purposes.
|
|
1002
|
-
* This is automatically attached if Alepha#create() detects a test environment and global 'onTestFinished' is available.
|
|
1003
|
-
*/
|
|
1004
|
-
"alepha.test.onTestFinished"?: (run: any) => any;
|
|
1005
|
-
/**
|
|
1006
|
-
* List of static assets to be copied to the output directory during the build process.
|
|
1007
|
-
*
|
|
1008
|
-
* Used for Alepha-based applications that require static assets.
|
|
1009
|
-
*
|
|
1010
|
-
* See alepha/vite for more details.
|
|
1011
|
-
*/
|
|
1012
|
-
"alepha.build.assets"?: Array<string>;
|
|
1013
|
-
}
|
|
1014
|
-
interface Hooks {
|
|
1015
|
-
/**
|
|
1016
|
-
* Used for testing purposes.
|
|
1017
|
-
*/
|
|
1018
|
-
echo: unknown;
|
|
1019
|
-
/**
|
|
1020
|
-
* Triggered during the configuration phase. Before the start phase.
|
|
1021
|
-
*/
|
|
1022
|
-
configure: Alepha;
|
|
1023
|
-
/**
|
|
1024
|
-
* Triggered during the start phase. When `Alepha#start()` is called.
|
|
1025
|
-
*/
|
|
1026
|
-
start: Alepha;
|
|
1027
|
-
/**
|
|
1028
|
-
* Triggered during the ready phase. After the start phase.
|
|
1029
|
-
*/
|
|
1030
|
-
ready: Alepha;
|
|
1031
|
-
/**
|
|
1032
|
-
* Triggered during the stop phase.
|
|
1033
|
-
*
|
|
1034
|
-
* - Stop should be called after a SIGINT or SIGTERM signal in order to gracefully shutdown the application. (@see `run()` method)
|
|
1035
|
-
*
|
|
1036
|
-
*/
|
|
1037
|
-
stop: Alepha;
|
|
1038
|
-
/**
|
|
1039
|
-
* Triggered when a state value is mutated.
|
|
1040
|
-
*/
|
|
1041
|
-
"state:mutate": {
|
|
1042
|
-
/**
|
|
1043
|
-
* The key of the state that was mutated.
|
|
1044
|
-
*/
|
|
1045
|
-
key: keyof State;
|
|
1046
|
-
/**
|
|
1047
|
-
* The new value of the state.
|
|
1048
|
-
*/
|
|
1049
|
-
value: any;
|
|
1050
|
-
/**
|
|
1051
|
-
* The previous value of the state.
|
|
1052
|
-
*/
|
|
1053
|
-
prevValue: any;
|
|
1054
|
-
};
|
|
1055
|
-
}
|
|
1056
|
-
//#endregion
|
|
1057
|
-
//#region ../alepha/src/core/schemas/pageSchema.d.ts
|
|
1058
|
-
declare const pageMetadataSchema: TObject$1<{
|
|
1059
|
-
number: TInteger;
|
|
1060
|
-
size: TInteger;
|
|
1061
|
-
offset: TInteger;
|
|
1062
|
-
numberOfElements: TInteger;
|
|
1063
|
-
totalElements: TOptional<TInteger>;
|
|
1064
|
-
totalPages: TOptional<TInteger>;
|
|
1065
|
-
isEmpty: TBoolean;
|
|
1066
|
-
isFirst: TBoolean;
|
|
1067
|
-
isLast: TBoolean;
|
|
1068
|
-
sort: TOptional<TObject$1<{
|
|
1069
|
-
sorted: TBoolean;
|
|
1070
|
-
fields: TArray$1<TObject$1<{
|
|
1071
|
-
field: TString;
|
|
1072
|
-
direction: TUnsafe<"asc" | "desc">;
|
|
1073
|
-
}>>;
|
|
1074
|
-
}>>;
|
|
1075
|
-
}>;
|
|
1076
|
-
type TPage<T extends TObject$1 | TRecord> = TObject$1<{
|
|
1077
|
-
content: TArray$1<T>;
|
|
1078
|
-
page: typeof pageMetadataSchema;
|
|
1079
|
-
}>;
|
|
1080
|
-
declare module "alepha" {
|
|
1081
|
-
interface TypeProvider {
|
|
1082
|
-
/**
|
|
1083
|
-
* Create a schema for a paginated response.
|
|
1084
|
-
*/
|
|
1085
|
-
page<T extends TObject$1 | TRecord>(itemSchema: T): TPage<T>;
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
//#endregion
|
|
1089
|
-
//#region ../alepha/src/logger/schemas/logEntrySchema.d.ts
|
|
1090
|
-
declare const logEntrySchema: TObject$1<{
|
|
1091
|
-
level: TUnsafe<"TRACE" | "DEBUG" | "INFO" | "WARN" | "ERROR" | "SILENT">;
|
|
1092
|
-
message: TString;
|
|
1093
|
-
service: TString;
|
|
1094
|
-
module: TString;
|
|
1095
|
-
context: TOptional<TString>;
|
|
1096
|
-
app: TOptional<TString>;
|
|
1097
|
-
data: TOptional<TAny>;
|
|
1098
|
-
timestamp: TNumber;
|
|
1099
|
-
}>;
|
|
1100
|
-
type LogEntry = Static$1<typeof logEntrySchema>;
|
|
1101
|
-
//#endregion
|
|
1102
|
-
//#region ../alepha/src/datetime/providers/DateTimeProvider.d.ts
|
|
1103
|
-
type DateTime = DayjsApi.Dayjs;
|
|
1104
|
-
type Duration = dayjsDuration.Duration;
|
|
1105
|
-
type DurationLike = number | dayjsDuration.Duration | [number, ManipulateType];
|
|
1106
|
-
declare class DateTimeProvider {
|
|
1107
|
-
static PLUGINS: Array<PluginFunc<any>>;
|
|
1108
|
-
protected alepha: Alepha;
|
|
1109
|
-
protected ref: DateTime | null;
|
|
1110
|
-
protected readonly timeouts: Timeout[];
|
|
1111
|
-
protected readonly intervals: Interval[];
|
|
1112
|
-
constructor();
|
|
1113
|
-
protected readonly onStart: HookPrimitive<"start">;
|
|
1114
|
-
protected readonly onStop: HookPrimitive<"stop">;
|
|
1115
|
-
setLocale(locale: string): void;
|
|
1116
|
-
isDateTime(value: unknown): value is DateTime;
|
|
1117
|
-
/**
|
|
1118
|
-
* Create a new UTC DateTime instance.
|
|
1119
|
-
*/
|
|
1120
|
-
utc(date: string | number | Date | Dayjs | null | undefined): DateTime;
|
|
1121
|
-
/**
|
|
1122
|
-
* Create a new DateTime instance.
|
|
1123
|
-
*/
|
|
1124
|
-
of(date: string | number | Date | Dayjs | null | undefined): DateTime;
|
|
1125
|
-
/**
|
|
1126
|
-
* Get the current date as a string.
|
|
1127
|
-
*/
|
|
1128
|
-
toISOString(date?: Date | string | DateTime): string;
|
|
1129
|
-
/**
|
|
1130
|
-
* Get the current date.
|
|
1131
|
-
*/
|
|
1132
|
-
now(): DateTime;
|
|
1133
|
-
/**
|
|
1134
|
-
* Get the current date as a string.
|
|
1135
|
-
*
|
|
1136
|
-
* This is much faster than `DateTimeProvider.now().toISOString()` as it avoids creating a DateTime instance.
|
|
1137
|
-
*/
|
|
1138
|
-
nowISOString(): string;
|
|
1139
|
-
/**
|
|
1140
|
-
* Get the current date as milliseconds since epoch.
|
|
1141
|
-
*
|
|
1142
|
-
* This is much faster than `DateTimeProvider.now().valueOf()` as it avoids creating a DateTime instance.
|
|
1143
|
-
*/
|
|
1144
|
-
nowMillis(): number;
|
|
1145
|
-
/**
|
|
1146
|
-
* Get the current date as a string.
|
|
1147
|
-
*
|
|
1148
|
-
* @protected
|
|
1149
|
-
*/
|
|
1150
|
-
protected getCurrentDate(): DateTime;
|
|
1151
|
-
/**
|
|
1152
|
-
* Create a new Duration instance.
|
|
1153
|
-
*/
|
|
1154
|
-
duration: (duration: DurationLike, unit?: ManipulateType) => Duration;
|
|
1155
|
-
isDurationLike(value: unknown): value is DurationLike;
|
|
1156
|
-
/**
|
|
1157
|
-
* Return a promise that resolves after the next tick.
|
|
1158
|
-
* It uses `setTimeout` with 0 ms delay.
|
|
1159
|
-
*/
|
|
1160
|
-
tick(): Promise<void>;
|
|
1161
|
-
/**
|
|
1162
|
-
* Wait for a certain duration.
|
|
1163
|
-
*
|
|
1164
|
-
* You can clear the timeout by using the `AbortSignal` API.
|
|
1165
|
-
* Aborted signal will resolve the promise immediately, it does not reject it.
|
|
1166
|
-
*/
|
|
1167
|
-
wait(duration: DurationLike, options?: {
|
|
1168
|
-
signal?: AbortSignal;
|
|
1169
|
-
now?: number;
|
|
1170
|
-
}): Promise<void>;
|
|
1171
|
-
createInterval(run: () => unknown, duration: DurationLike, start?: boolean): Interval;
|
|
1172
|
-
/**
|
|
1173
|
-
* Run a callback after a certain duration.
|
|
1174
|
-
*/
|
|
1175
|
-
createTimeout(callback: () => void, duration: DurationLike, now?: number): Timeout;
|
|
1176
|
-
clearTimeout(timeout: Timeout): void;
|
|
1177
|
-
clearInterval(interval: Interval): void;
|
|
1178
|
-
/**
|
|
1179
|
-
* Run a function with a deadline.
|
|
1180
|
-
*/
|
|
1181
|
-
deadline<T>(fn: (signal: AbortSignal) => Promise<T>, duration: DurationLike): Promise<T>;
|
|
1182
|
-
/**
|
|
1183
|
-
* Add time to the current date.
|
|
1184
|
-
*/
|
|
1185
|
-
travel(duration: DurationLike, unit?: ManipulateType): Promise<void>;
|
|
1186
|
-
/**
|
|
1187
|
-
* Stop the time.
|
|
1188
|
-
*/
|
|
1189
|
-
pause(): DateTime;
|
|
1190
|
-
/**
|
|
1191
|
-
* Reset the reference date.
|
|
1192
|
-
*/
|
|
1193
|
-
reset(): void;
|
|
1194
|
-
}
|
|
1195
|
-
interface Interval {
|
|
1196
|
-
timer?: any;
|
|
1197
|
-
duration: number;
|
|
1198
|
-
run: () => unknown;
|
|
1199
|
-
}
|
|
1200
|
-
interface Timeout {
|
|
1201
|
-
now: number;
|
|
1202
|
-
timer?: any;
|
|
1203
|
-
duration: number;
|
|
1204
|
-
callback: () => void;
|
|
1205
|
-
clear: () => void;
|
|
1206
|
-
}
|
|
1207
|
-
//#endregion
|
|
1208
|
-
//#region ../alepha/src/logger/providers/LogDestinationProvider.d.ts
|
|
1209
|
-
declare abstract class LogDestinationProvider {
|
|
1210
|
-
abstract write(message: string, entry: LogEntry): void;
|
|
1211
|
-
}
|
|
1212
|
-
//#endregion
|
|
1213
|
-
//#region ../alepha/src/logger/providers/LogFormatterProvider.d.ts
|
|
1214
|
-
declare abstract class LogFormatterProvider {
|
|
1215
|
-
abstract format(entry: LogEntry): string;
|
|
1216
|
-
}
|
|
1217
|
-
//#endregion
|
|
1218
|
-
//#region ../alepha/src/logger/services/Logger.d.ts
|
|
1219
|
-
declare class Logger implements LoggerInterface {
|
|
1220
|
-
protected readonly alepha: Alepha;
|
|
1221
|
-
protected readonly formatter: LogFormatterProvider;
|
|
1222
|
-
protected readonly destination: LogDestinationProvider;
|
|
1223
|
-
protected readonly dateTimeProvider: DateTimeProvider;
|
|
1224
|
-
protected readonly levels: Record<string, number>;
|
|
1225
|
-
protected readonly service: string;
|
|
1226
|
-
protected readonly module: string;
|
|
1227
|
-
protected readonly app?: string;
|
|
1228
|
-
protected appLogLevel: string;
|
|
1229
|
-
protected logLevel: LogLevel;
|
|
1230
|
-
constructor(service: string, module: string);
|
|
1231
|
-
get context(): string | undefined;
|
|
1232
|
-
get level(): string;
|
|
1233
|
-
parseLevel(level: string, app: string): LogLevel;
|
|
1234
|
-
private matchesPattern;
|
|
1235
|
-
asLogLevel(something: string): LogLevel;
|
|
1236
|
-
error(message: string, data?: unknown): void;
|
|
1237
|
-
warn(message: string, data?: unknown): void;
|
|
1238
|
-
info(message: string, data?: unknown): void;
|
|
1239
|
-
debug(message: string, data?: unknown): void;
|
|
1240
|
-
trace(message: string, data?: unknown): void;
|
|
1241
|
-
protected log(level: LogLevel, message: string, data?: unknown): void;
|
|
1242
|
-
protected emit(entry: LogEntry, message?: string): void;
|
|
1243
|
-
}
|
|
1244
|
-
//#endregion
|
|
1245
|
-
//#region ../alepha/src/logger/index.d.ts
|
|
1246
|
-
declare const envSchema: TObject$1<{
|
|
1247
|
-
/**
|
|
1248
|
-
* Default log level for the application.
|
|
1249
|
-
*
|
|
1250
|
-
* Default by environment:
|
|
1251
|
-
* - dev = info
|
|
1252
|
-
* - prod = info
|
|
1253
|
-
* - test = error
|
|
1254
|
-
*
|
|
1255
|
-
* Levels are: "trace" | "debug" | "info" | "warn" | "error" | "silent"
|
|
1256
|
-
*
|
|
1257
|
-
* Level can be set for a specific module:
|
|
1258
|
-
*
|
|
1259
|
-
* @example
|
|
1260
|
-
* LOG_LEVEL=my.module.name:debug,info # Set debug level for my.module.name and info for all other modules
|
|
1261
|
-
* LOG_LEVEL=alepha:trace, info # Set trace level for all alepha modules and info for all other modules
|
|
1262
|
-
*/
|
|
1263
|
-
LOG_LEVEL: TOptional<TString>;
|
|
1264
|
-
/**
|
|
1265
|
-
* Built-in log formats.
|
|
1266
|
-
* - "json" - JSON format, useful for structured logging and log aggregation. {@link JsonFormatterProvider}
|
|
1267
|
-
* - "pretty" - Simple text format, human-readable, with colors. {@link PrettyFormatterProvider}
|
|
1268
|
-
* - "raw" - Raw format, no formatting, just the message. {@link RawFormatterProvider}
|
|
1269
|
-
*/
|
|
1270
|
-
LOG_FORMAT: TOptional<TUnsafe<"json" | "pretty" | "raw">>;
|
|
1271
|
-
}>;
|
|
1272
|
-
declare module "alepha" {
|
|
1273
|
-
interface Env extends Partial<Static$1<typeof envSchema>> {}
|
|
1274
|
-
interface State {
|
|
1275
|
-
/**
|
|
1276
|
-
* Current log level for the application or specific modules.
|
|
1277
|
-
*/
|
|
1278
|
-
"alepha.logger.level"?: string;
|
|
1279
|
-
}
|
|
1280
|
-
interface Hooks {
|
|
1281
|
-
log: {
|
|
1282
|
-
message?: string;
|
|
1283
|
-
entry: LogEntry;
|
|
1284
|
-
};
|
|
1285
|
-
}
|
|
1286
|
-
}
|
|
1287
|
-
//#endregion
|
|
1288
5
|
//#region src/api/schemas/DevActionMetadata.d.ts
|
|
1289
|
-
declare const devActionMetadataSchema: TObject
|
|
1290
|
-
name: TString;
|
|
1291
|
-
group: TString;
|
|
1292
|
-
method: TString;
|
|
1293
|
-
path: TString;
|
|
1294
|
-
prefix: TString;
|
|
1295
|
-
fullPath: TString;
|
|
1296
|
-
description: TOptional<TString>;
|
|
1297
|
-
summary: TOptional<TString>;
|
|
1298
|
-
disabled: TOptional<TBoolean>;
|
|
1299
|
-
secure: TOptional<TBoolean>;
|
|
1300
|
-
hide: TOptional<TBoolean>;
|
|
1301
|
-
body: TOptional<TAny>;
|
|
1302
|
-
params: TOptional<TAny>;
|
|
1303
|
-
query: TOptional<TAny>;
|
|
1304
|
-
response: TOptional<TAny>;
|
|
1305
|
-
bodyContentType: TOptional<TString>;
|
|
6
|
+
declare const devActionMetadataSchema: alepha8.TObject<{
|
|
7
|
+
name: alepha8.TString;
|
|
8
|
+
group: alepha8.TString;
|
|
9
|
+
method: alepha8.TString;
|
|
10
|
+
path: alepha8.TString;
|
|
11
|
+
prefix: alepha8.TString;
|
|
12
|
+
fullPath: alepha8.TString;
|
|
13
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
14
|
+
summary: alepha8.TOptional<alepha8.TString>;
|
|
15
|
+
disabled: alepha8.TOptional<alepha8.TBoolean>;
|
|
16
|
+
secure: alepha8.TOptional<alepha8.TBoolean>;
|
|
17
|
+
hide: alepha8.TOptional<alepha8.TBoolean>;
|
|
18
|
+
body: alepha8.TOptional<alepha8.TAny>;
|
|
19
|
+
params: alepha8.TOptional<alepha8.TAny>;
|
|
20
|
+
query: alepha8.TOptional<alepha8.TAny>;
|
|
21
|
+
response: alepha8.TOptional<alepha8.TAny>;
|
|
22
|
+
bodyContentType: alepha8.TOptional<alepha8.TString>;
|
|
1306
23
|
}>;
|
|
1307
|
-
type DevActionMetadata = Static
|
|
24
|
+
type DevActionMetadata = Static<typeof devActionMetadataSchema>;
|
|
1308
25
|
//#endregion
|
|
1309
26
|
//#region src/api/schemas/DevAtomMetadata.d.ts
|
|
1310
|
-
declare const devAtomMetadataSchema: TObject
|
|
27
|
+
declare const devAtomMetadataSchema: alepha8.TObject<{
|
|
1311
28
|
/**
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
name: TString;
|
|
29
|
+
* The unique name/key of the atom
|
|
30
|
+
*/
|
|
31
|
+
name: alepha8.TString;
|
|
1315
32
|
/**
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
description: TOptional<TString>;
|
|
33
|
+
* Optional description of the atom
|
|
34
|
+
*/
|
|
35
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
1319
36
|
/**
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
schema: TAny;
|
|
37
|
+
* The schema for the atom value (TypeBox/JSON Schema)
|
|
38
|
+
*/
|
|
39
|
+
schema: alepha8.TAny;
|
|
1323
40
|
/**
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
defaultValue: TOptional<TAny>;
|
|
41
|
+
* The default value defined for the atom
|
|
42
|
+
*/
|
|
43
|
+
defaultValue: alepha8.TOptional<alepha8.TAny>;
|
|
1327
44
|
/**
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
currentValue: TOptional<TAny>;
|
|
45
|
+
* The current value of the atom
|
|
46
|
+
*/
|
|
47
|
+
currentValue: alepha8.TOptional<alepha8.TAny>;
|
|
1331
48
|
}>;
|
|
1332
|
-
type DevAtomMetadata = Static
|
|
49
|
+
type DevAtomMetadata = Static<typeof devAtomMetadataSchema>;
|
|
1333
50
|
//#endregion
|
|
1334
51
|
//#region src/api/schemas/DevBucketMetadata.d.ts
|
|
1335
|
-
declare const devBucketMetadataSchema: TObject
|
|
1336
|
-
name: TString;
|
|
1337
|
-
description: TOptional<TString>;
|
|
1338
|
-
mimeTypes: TOptional<TArray
|
|
1339
|
-
maxSize: TOptional<TNumber>;
|
|
1340
|
-
provider: TString;
|
|
52
|
+
declare const devBucketMetadataSchema: alepha8.TObject<{
|
|
53
|
+
name: alepha8.TString;
|
|
54
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
55
|
+
mimeTypes: alepha8.TOptional<alepha8.TArray<alepha8.TString>>;
|
|
56
|
+
maxSize: alepha8.TOptional<alepha8.TNumber>;
|
|
57
|
+
provider: alepha8.TString;
|
|
1341
58
|
}>;
|
|
1342
|
-
type DevBucketMetadata = Static
|
|
59
|
+
type DevBucketMetadata = Static<typeof devBucketMetadataSchema>;
|
|
1343
60
|
//#endregion
|
|
1344
61
|
//#region src/api/schemas/DevCacheMetadata.d.ts
|
|
1345
|
-
declare const devCacheMetadataSchema: TObject
|
|
1346
|
-
name: TString;
|
|
1347
|
-
ttl: TOptional<TAny>;
|
|
1348
|
-
disabled: TOptional<TBoolean>;
|
|
1349
|
-
provider: TString;
|
|
62
|
+
declare const devCacheMetadataSchema: alepha8.TObject<{
|
|
63
|
+
name: alepha8.TString;
|
|
64
|
+
ttl: alepha8.TOptional<alepha8.TAny>;
|
|
65
|
+
disabled: alepha8.TOptional<alepha8.TBoolean>;
|
|
66
|
+
provider: alepha8.TString;
|
|
1350
67
|
}>;
|
|
1351
|
-
type DevCacheMetadata = Static
|
|
68
|
+
type DevCacheMetadata = Static<typeof devCacheMetadataSchema>;
|
|
1352
69
|
//#endregion
|
|
1353
70
|
//#region src/api/schemas/DevCommandMetadata.d.ts
|
|
1354
|
-
declare const devCommandMetadataSchema: TObject
|
|
1355
|
-
name: TString;
|
|
1356
|
-
description: TOptional<TString>;
|
|
1357
|
-
hidden: TOptional<TBoolean>;
|
|
71
|
+
declare const devCommandMetadataSchema: alepha8.TObject<{
|
|
72
|
+
name: alepha8.TString;
|
|
73
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
74
|
+
hidden: alepha8.TOptional<alepha8.TBoolean>;
|
|
1358
75
|
}>;
|
|
1359
|
-
type DevCommandMetadata = Static
|
|
76
|
+
type DevCommandMetadata = Static<typeof devCommandMetadataSchema>;
|
|
1360
77
|
//#endregion
|
|
1361
78
|
//#region src/api/schemas/DevEntityMetadata.d.ts
|
|
1362
|
-
declare const devEntityColumnSchema: TObject
|
|
1363
|
-
name: TString;
|
|
1364
|
-
type: TString;
|
|
1365
|
-
nullable: TBoolean;
|
|
1366
|
-
primaryKey: TBoolean;
|
|
1367
|
-
identity: TBoolean;
|
|
1368
|
-
createdAt: TBoolean;
|
|
1369
|
-
updatedAt: TBoolean;
|
|
1370
|
-
deletedAt: TBoolean;
|
|
1371
|
-
version: TBoolean;
|
|
1372
|
-
hasDefault: TBoolean;
|
|
1373
|
-
ref: TOptional<TObject
|
|
1374
|
-
entity: TString;
|
|
1375
|
-
column: TString;
|
|
1376
|
-
onUpdate: TOptional<TString>;
|
|
1377
|
-
onDelete: TOptional<TString>;
|
|
79
|
+
declare const devEntityColumnSchema: alepha8.TObject<{
|
|
80
|
+
name: alepha8.TString;
|
|
81
|
+
type: alepha8.TString;
|
|
82
|
+
nullable: alepha8.TBoolean;
|
|
83
|
+
primaryKey: alepha8.TBoolean;
|
|
84
|
+
identity: alepha8.TBoolean;
|
|
85
|
+
createdAt: alepha8.TBoolean;
|
|
86
|
+
updatedAt: alepha8.TBoolean;
|
|
87
|
+
deletedAt: alepha8.TBoolean;
|
|
88
|
+
version: alepha8.TBoolean;
|
|
89
|
+
hasDefault: alepha8.TBoolean;
|
|
90
|
+
ref: alepha8.TOptional<alepha8.TObject<{
|
|
91
|
+
entity: alepha8.TString;
|
|
92
|
+
column: alepha8.TString;
|
|
93
|
+
onUpdate: alepha8.TOptional<alepha8.TString>;
|
|
94
|
+
onDelete: alepha8.TOptional<alepha8.TString>;
|
|
1378
95
|
}>>;
|
|
1379
96
|
}>;
|
|
1380
|
-
declare const devEntityIndexSchema: TObject
|
|
1381
|
-
name: TOptional<TString>;
|
|
1382
|
-
columns: TArray
|
|
1383
|
-
unique: TBoolean;
|
|
97
|
+
declare const devEntityIndexSchema: alepha8.TObject<{
|
|
98
|
+
name: alepha8.TOptional<alepha8.TString>;
|
|
99
|
+
columns: alepha8.TArray<alepha8.TString>;
|
|
100
|
+
unique: alepha8.TBoolean;
|
|
1384
101
|
}>;
|
|
1385
|
-
declare const devEntityForeignKeySchema: TObject
|
|
1386
|
-
name: TOptional<TString>;
|
|
1387
|
-
columns: TArray
|
|
1388
|
-
foreignEntity: TString;
|
|
1389
|
-
foreignColumns: TArray
|
|
102
|
+
declare const devEntityForeignKeySchema: alepha8.TObject<{
|
|
103
|
+
name: alepha8.TOptional<alepha8.TString>;
|
|
104
|
+
columns: alepha8.TArray<alepha8.TString>;
|
|
105
|
+
foreignEntity: alepha8.TString;
|
|
106
|
+
foreignColumns: alepha8.TArray<alepha8.TString>;
|
|
1390
107
|
}>;
|
|
1391
|
-
declare const devEntityConstraintSchema: TObject
|
|
1392
|
-
name: TOptional<TString>;
|
|
1393
|
-
columns: TArray
|
|
1394
|
-
unique: TBoolean;
|
|
1395
|
-
hasCheck: TBoolean;
|
|
108
|
+
declare const devEntityConstraintSchema: alepha8.TObject<{
|
|
109
|
+
name: alepha8.TOptional<alepha8.TString>;
|
|
110
|
+
columns: alepha8.TArray<alepha8.TString>;
|
|
111
|
+
unique: alepha8.TBoolean;
|
|
112
|
+
hasCheck: alepha8.TBoolean;
|
|
1396
113
|
}>;
|
|
1397
|
-
declare const devEntityMetadataSchema: TObject
|
|
1398
|
-
name: TString;
|
|
1399
|
-
provider: TString;
|
|
1400
|
-
columns: TArray
|
|
1401
|
-
name: TString;
|
|
1402
|
-
type: TString;
|
|
1403
|
-
nullable: TBoolean;
|
|
1404
|
-
primaryKey: TBoolean;
|
|
1405
|
-
identity: TBoolean;
|
|
1406
|
-
createdAt: TBoolean;
|
|
1407
|
-
updatedAt: TBoolean;
|
|
1408
|
-
deletedAt: TBoolean;
|
|
1409
|
-
version: TBoolean;
|
|
1410
|
-
hasDefault: TBoolean;
|
|
1411
|
-
ref: TOptional<TObject
|
|
1412
|
-
entity: TString;
|
|
1413
|
-
column: TString;
|
|
1414
|
-
onUpdate: TOptional<TString>;
|
|
1415
|
-
onDelete: TOptional<TString>;
|
|
114
|
+
declare const devEntityMetadataSchema: alepha8.TObject<{
|
|
115
|
+
name: alepha8.TString;
|
|
116
|
+
provider: alepha8.TString;
|
|
117
|
+
columns: alepha8.TArray<alepha8.TObject<{
|
|
118
|
+
name: alepha8.TString;
|
|
119
|
+
type: alepha8.TString;
|
|
120
|
+
nullable: alepha8.TBoolean;
|
|
121
|
+
primaryKey: alepha8.TBoolean;
|
|
122
|
+
identity: alepha8.TBoolean;
|
|
123
|
+
createdAt: alepha8.TBoolean;
|
|
124
|
+
updatedAt: alepha8.TBoolean;
|
|
125
|
+
deletedAt: alepha8.TBoolean;
|
|
126
|
+
version: alepha8.TBoolean;
|
|
127
|
+
hasDefault: alepha8.TBoolean;
|
|
128
|
+
ref: alepha8.TOptional<alepha8.TObject<{
|
|
129
|
+
entity: alepha8.TString;
|
|
130
|
+
column: alepha8.TString;
|
|
131
|
+
onUpdate: alepha8.TOptional<alepha8.TString>;
|
|
132
|
+
onDelete: alepha8.TOptional<alepha8.TString>;
|
|
1416
133
|
}>>;
|
|
1417
134
|
}>>;
|
|
1418
|
-
indexes: TArray
|
|
1419
|
-
name: TOptional<TString>;
|
|
1420
|
-
columns: TArray
|
|
1421
|
-
unique: TBoolean;
|
|
135
|
+
indexes: alepha8.TArray<alepha8.TObject<{
|
|
136
|
+
name: alepha8.TOptional<alepha8.TString>;
|
|
137
|
+
columns: alepha8.TArray<alepha8.TString>;
|
|
138
|
+
unique: alepha8.TBoolean;
|
|
1422
139
|
}>>;
|
|
1423
|
-
foreignKeys: TArray
|
|
1424
|
-
name: TOptional<TString>;
|
|
1425
|
-
columns: TArray
|
|
1426
|
-
foreignEntity: TString;
|
|
1427
|
-
foreignColumns: TArray
|
|
140
|
+
foreignKeys: alepha8.TArray<alepha8.TObject<{
|
|
141
|
+
name: alepha8.TOptional<alepha8.TString>;
|
|
142
|
+
columns: alepha8.TArray<alepha8.TString>;
|
|
143
|
+
foreignEntity: alepha8.TString;
|
|
144
|
+
foreignColumns: alepha8.TArray<alepha8.TString>;
|
|
1428
145
|
}>>;
|
|
1429
|
-
constraints: TArray
|
|
1430
|
-
name: TOptional<TString>;
|
|
1431
|
-
columns: TArray
|
|
1432
|
-
unique: TBoolean;
|
|
1433
|
-
hasCheck: TBoolean;
|
|
146
|
+
constraints: alepha8.TArray<alepha8.TObject<{
|
|
147
|
+
name: alepha8.TOptional<alepha8.TString>;
|
|
148
|
+
columns: alepha8.TArray<alepha8.TString>;
|
|
149
|
+
unique: alepha8.TBoolean;
|
|
150
|
+
hasCheck: alepha8.TBoolean;
|
|
1434
151
|
}>>;
|
|
1435
152
|
}>;
|
|
1436
|
-
type DevEntityColumn = Static
|
|
1437
|
-
type DevEntityIndex = Static
|
|
1438
|
-
type DevEntityForeignKey = Static
|
|
1439
|
-
type DevEntityConstraint = Static
|
|
1440
|
-
type DevEntityMetadata = Static
|
|
153
|
+
type DevEntityColumn = Static<typeof devEntityColumnSchema>;
|
|
154
|
+
type DevEntityIndex = Static<typeof devEntityIndexSchema>;
|
|
155
|
+
type DevEntityForeignKey = Static<typeof devEntityForeignKeySchema>;
|
|
156
|
+
type DevEntityConstraint = Static<typeof devEntityConstraintSchema>;
|
|
157
|
+
type DevEntityMetadata = Static<typeof devEntityMetadataSchema>;
|
|
1441
158
|
//#endregion
|
|
1442
159
|
//#region src/api/schemas/DevEnvMetadata.d.ts
|
|
1443
|
-
declare const devEnvMetadataSchema: TObject
|
|
160
|
+
declare const devEnvMetadataSchema: alepha8.TObject<{
|
|
1444
161
|
/**
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
propertyKey: TString;
|
|
162
|
+
* The property name in the service where $env is defined
|
|
163
|
+
*/
|
|
164
|
+
propertyKey: alepha8.TString;
|
|
1448
165
|
/**
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
schema: TAny;
|
|
166
|
+
* The schema for the environment variables (TypeBox/JSON Schema)
|
|
167
|
+
*/
|
|
168
|
+
schema: alepha8.TAny;
|
|
1452
169
|
/**
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
values: TRecord<"^.*$", TAny>;
|
|
170
|
+
* The parsed values from the environment
|
|
171
|
+
*/
|
|
172
|
+
values: alepha8.TRecord<"^.*$", alepha8.TAny>;
|
|
1456
173
|
/**
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
serviceName: TOptional<TString>;
|
|
174
|
+
* The service class name where this $env is defined
|
|
175
|
+
*/
|
|
176
|
+
serviceName: alepha8.TOptional<alepha8.TString>;
|
|
1460
177
|
}>;
|
|
1461
|
-
type DevEnvMetadata = Static
|
|
178
|
+
type DevEnvMetadata = Static<typeof devEnvMetadataSchema>;
|
|
1462
179
|
//#endregion
|
|
1463
180
|
//#region src/api/schemas/DevMetadata.d.ts
|
|
1464
|
-
declare const devMetadataSchema: TObject
|
|
1465
|
-
actions: TArray
|
|
1466
|
-
name: TString;
|
|
1467
|
-
group: TString;
|
|
1468
|
-
method: TString;
|
|
1469
|
-
path: TString;
|
|
1470
|
-
prefix: TString;
|
|
1471
|
-
fullPath: TString;
|
|
1472
|
-
description: TOptional<TString>;
|
|
1473
|
-
summary: TOptional<TString>;
|
|
1474
|
-
disabled: TOptional<TBoolean>;
|
|
1475
|
-
secure: TOptional<TBoolean>;
|
|
1476
|
-
hide: TOptional<TBoolean>;
|
|
1477
|
-
body: TOptional<TAny>;
|
|
1478
|
-
params: TOptional<TAny>;
|
|
1479
|
-
query: TOptional<TAny>;
|
|
1480
|
-
response: TOptional<TAny>;
|
|
1481
|
-
bodyContentType: TOptional<TString>;
|
|
181
|
+
declare const devMetadataSchema: alepha8.TObject<{
|
|
182
|
+
actions: alepha8.TArray<alepha8.TObject<{
|
|
183
|
+
name: alepha8.TString;
|
|
184
|
+
group: alepha8.TString;
|
|
185
|
+
method: alepha8.TString;
|
|
186
|
+
path: alepha8.TString;
|
|
187
|
+
prefix: alepha8.TString;
|
|
188
|
+
fullPath: alepha8.TString;
|
|
189
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
190
|
+
summary: alepha8.TOptional<alepha8.TString>;
|
|
191
|
+
disabled: alepha8.TOptional<alepha8.TBoolean>;
|
|
192
|
+
secure: alepha8.TOptional<alepha8.TBoolean>;
|
|
193
|
+
hide: alepha8.TOptional<alepha8.TBoolean>;
|
|
194
|
+
body: alepha8.TOptional<alepha8.TAny>;
|
|
195
|
+
params: alepha8.TOptional<alepha8.TAny>;
|
|
196
|
+
query: alepha8.TOptional<alepha8.TAny>;
|
|
197
|
+
response: alepha8.TOptional<alepha8.TAny>;
|
|
198
|
+
bodyContentType: alepha8.TOptional<alepha8.TString>;
|
|
1482
199
|
}>>;
|
|
1483
|
-
queues: TArray
|
|
1484
|
-
name: TString;
|
|
1485
|
-
description: TOptional<TString>;
|
|
1486
|
-
schema: TOptional<TAny>;
|
|
1487
|
-
provider: TString;
|
|
200
|
+
queues: alepha8.TArray<alepha8.TObject<{
|
|
201
|
+
name: alepha8.TString;
|
|
202
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
203
|
+
schema: alepha8.TOptional<alepha8.TAny>;
|
|
204
|
+
provider: alepha8.TString;
|
|
1488
205
|
}>>;
|
|
1489
|
-
schedulers: TArray
|
|
1490
|
-
name: TString;
|
|
1491
|
-
description: TOptional<TString>;
|
|
1492
|
-
cron: TOptional<TString>;
|
|
1493
|
-
interval: TOptional<TAny>;
|
|
1494
|
-
lock: TOptional<TBoolean>;
|
|
206
|
+
schedulers: alepha8.TArray<alepha8.TObject<{
|
|
207
|
+
name: alepha8.TString;
|
|
208
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
209
|
+
cron: alepha8.TOptional<alepha8.TString>;
|
|
210
|
+
interval: alepha8.TOptional<alepha8.TAny>;
|
|
211
|
+
lock: alepha8.TOptional<alepha8.TBoolean>;
|
|
1495
212
|
}>>;
|
|
1496
|
-
topics: TArray
|
|
1497
|
-
name: TString;
|
|
1498
|
-
description: TOptional<TString>;
|
|
1499
|
-
schema: TOptional<TAny>;
|
|
1500
|
-
provider: TString;
|
|
213
|
+
topics: alepha8.TArray<alepha8.TObject<{
|
|
214
|
+
name: alepha8.TString;
|
|
215
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
216
|
+
schema: alepha8.TOptional<alepha8.TAny>;
|
|
217
|
+
provider: alepha8.TString;
|
|
1501
218
|
}>>;
|
|
1502
|
-
buckets: TArray
|
|
1503
|
-
name: TString;
|
|
1504
|
-
description: TOptional<TString>;
|
|
1505
|
-
mimeTypes: TOptional<TArray
|
|
1506
|
-
maxSize: TOptional<TNumber>;
|
|
1507
|
-
provider: TString;
|
|
219
|
+
buckets: alepha8.TArray<alepha8.TObject<{
|
|
220
|
+
name: alepha8.TString;
|
|
221
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
222
|
+
mimeTypes: alepha8.TOptional<alepha8.TArray<alepha8.TString>>;
|
|
223
|
+
maxSize: alepha8.TOptional<alepha8.TNumber>;
|
|
224
|
+
provider: alepha8.TString;
|
|
1508
225
|
}>>;
|
|
1509
|
-
realms: TArray
|
|
1510
|
-
name: TString;
|
|
1511
|
-
description: TOptional<TString>;
|
|
1512
|
-
roles: TOptional<TArray
|
|
1513
|
-
type: TUnsafe<"internal" | "external">;
|
|
1514
|
-
settings: TOptional<TObject
|
|
1515
|
-
accessTokenExpiration: TOptional<TAny>;
|
|
1516
|
-
refreshTokenExpiration: TOptional<TAny>;
|
|
1517
|
-
hasOnCreateSession: TBoolean;
|
|
1518
|
-
hasOnRefreshSession: TBoolean;
|
|
1519
|
-
hasOnDeleteSession: TBoolean;
|
|
226
|
+
realms: alepha8.TArray<alepha8.TObject<{
|
|
227
|
+
name: alepha8.TString;
|
|
228
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
229
|
+
roles: alepha8.TOptional<alepha8.TArray<alepha8.TAny>>;
|
|
230
|
+
type: alepha8.TUnsafe<"internal" | "external">;
|
|
231
|
+
settings: alepha8.TOptional<alepha8.TObject<{
|
|
232
|
+
accessTokenExpiration: alepha8.TOptional<alepha8.TAny>;
|
|
233
|
+
refreshTokenExpiration: alepha8.TOptional<alepha8.TAny>;
|
|
234
|
+
hasOnCreateSession: alepha8.TBoolean;
|
|
235
|
+
hasOnRefreshSession: alepha8.TBoolean;
|
|
236
|
+
hasOnDeleteSession: alepha8.TBoolean;
|
|
1520
237
|
}>>;
|
|
1521
238
|
}>>;
|
|
1522
|
-
caches: TArray
|
|
1523
|
-
name: TString;
|
|
1524
|
-
ttl: TOptional<TAny>;
|
|
1525
|
-
disabled: TOptional<TBoolean>;
|
|
1526
|
-
provider: TString;
|
|
239
|
+
caches: alepha8.TArray<alepha8.TObject<{
|
|
240
|
+
name: alepha8.TString;
|
|
241
|
+
ttl: alepha8.TOptional<alepha8.TAny>;
|
|
242
|
+
disabled: alepha8.TOptional<alepha8.TBoolean>;
|
|
243
|
+
provider: alepha8.TString;
|
|
1527
244
|
}>>;
|
|
1528
|
-
pages: TArray
|
|
1529
|
-
name: TString;
|
|
1530
|
-
description: TOptional<TString>;
|
|
1531
|
-
path: TOptional<TString>;
|
|
1532
|
-
params: TOptional<TAny>;
|
|
1533
|
-
query: TOptional<TAny>;
|
|
1534
|
-
hasComponent: TBoolean;
|
|
1535
|
-
hasLazy: TBoolean;
|
|
1536
|
-
hasResolve: TBoolean;
|
|
1537
|
-
hasChildren: TBoolean;
|
|
1538
|
-
hasParent: TBoolean;
|
|
1539
|
-
hasErrorHandler: TBoolean;
|
|
1540
|
-
static: TOptional<TBoolean>;
|
|
1541
|
-
cache: TOptional<TAny>;
|
|
1542
|
-
client: TOptional<TAny>;
|
|
1543
|
-
animation: TOptional<TAny>;
|
|
245
|
+
pages: alepha8.TArray<alepha8.TObject<{
|
|
246
|
+
name: alepha8.TString;
|
|
247
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
248
|
+
path: alepha8.TOptional<alepha8.TString>;
|
|
249
|
+
params: alepha8.TOptional<alepha8.TAny>;
|
|
250
|
+
query: alepha8.TOptional<alepha8.TAny>;
|
|
251
|
+
hasComponent: alepha8.TBoolean;
|
|
252
|
+
hasLazy: alepha8.TBoolean;
|
|
253
|
+
hasResolve: alepha8.TBoolean;
|
|
254
|
+
hasChildren: alepha8.TBoolean;
|
|
255
|
+
hasParent: alepha8.TBoolean;
|
|
256
|
+
hasErrorHandler: alepha8.TBoolean;
|
|
257
|
+
static: alepha8.TOptional<alepha8.TBoolean>;
|
|
258
|
+
cache: alepha8.TOptional<alepha8.TAny>;
|
|
259
|
+
client: alepha8.TOptional<alepha8.TAny>;
|
|
260
|
+
animation: alepha8.TOptional<alepha8.TAny>;
|
|
1544
261
|
}>>;
|
|
1545
|
-
providers: TArray
|
|
1546
|
-
name: TString;
|
|
1547
|
-
module: TOptional<TString>;
|
|
1548
|
-
dependencies: TArray
|
|
1549
|
-
aliases: TOptional<TArray
|
|
262
|
+
providers: alepha8.TArray<alepha8.TObject<{
|
|
263
|
+
name: alepha8.TString;
|
|
264
|
+
module: alepha8.TOptional<alepha8.TString>;
|
|
265
|
+
dependencies: alepha8.TArray<alepha8.TString>;
|
|
266
|
+
aliases: alepha8.TOptional<alepha8.TArray<alepha8.TString>>;
|
|
1550
267
|
}>>;
|
|
1551
|
-
modules: TArray
|
|
1552
|
-
name: TString;
|
|
1553
|
-
providers: TArray
|
|
268
|
+
modules: alepha8.TArray<alepha8.TObject<{
|
|
269
|
+
name: alepha8.TString;
|
|
270
|
+
providers: alepha8.TArray<alepha8.TString>;
|
|
1554
271
|
}>>;
|
|
1555
|
-
entities: TArray
|
|
1556
|
-
name: TString;
|
|
1557
|
-
provider: TString;
|
|
1558
|
-
columns: TArray
|
|
1559
|
-
name: TString;
|
|
1560
|
-
type: TString;
|
|
1561
|
-
nullable: TBoolean;
|
|
1562
|
-
primaryKey: TBoolean;
|
|
1563
|
-
identity: TBoolean;
|
|
1564
|
-
createdAt: TBoolean;
|
|
1565
|
-
updatedAt: TBoolean;
|
|
1566
|
-
deletedAt: TBoolean;
|
|
1567
|
-
version: TBoolean;
|
|
1568
|
-
hasDefault: TBoolean;
|
|
1569
|
-
ref: TOptional<TObject
|
|
1570
|
-
entity: TString;
|
|
1571
|
-
column: TString;
|
|
1572
|
-
onUpdate: TOptional<TString>;
|
|
1573
|
-
onDelete: TOptional<TString>;
|
|
272
|
+
entities: alepha8.TArray<alepha8.TObject<{
|
|
273
|
+
name: alepha8.TString;
|
|
274
|
+
provider: alepha8.TString;
|
|
275
|
+
columns: alepha8.TArray<alepha8.TObject<{
|
|
276
|
+
name: alepha8.TString;
|
|
277
|
+
type: alepha8.TString;
|
|
278
|
+
nullable: alepha8.TBoolean;
|
|
279
|
+
primaryKey: alepha8.TBoolean;
|
|
280
|
+
identity: alepha8.TBoolean;
|
|
281
|
+
createdAt: alepha8.TBoolean;
|
|
282
|
+
updatedAt: alepha8.TBoolean;
|
|
283
|
+
deletedAt: alepha8.TBoolean;
|
|
284
|
+
version: alepha8.TBoolean;
|
|
285
|
+
hasDefault: alepha8.TBoolean;
|
|
286
|
+
ref: alepha8.TOptional<alepha8.TObject<{
|
|
287
|
+
entity: alepha8.TString;
|
|
288
|
+
column: alepha8.TString;
|
|
289
|
+
onUpdate: alepha8.TOptional<alepha8.TString>;
|
|
290
|
+
onDelete: alepha8.TOptional<alepha8.TString>;
|
|
1574
291
|
}>>;
|
|
1575
292
|
}>>;
|
|
1576
|
-
indexes: TArray
|
|
1577
|
-
name: TOptional<TString>;
|
|
1578
|
-
columns: TArray
|
|
1579
|
-
unique: TBoolean;
|
|
293
|
+
indexes: alepha8.TArray<alepha8.TObject<{
|
|
294
|
+
name: alepha8.TOptional<alepha8.TString>;
|
|
295
|
+
columns: alepha8.TArray<alepha8.TString>;
|
|
296
|
+
unique: alepha8.TBoolean;
|
|
1580
297
|
}>>;
|
|
1581
|
-
foreignKeys: TArray
|
|
1582
|
-
name: TOptional<TString>;
|
|
1583
|
-
columns: TArray
|
|
1584
|
-
foreignEntity: TString;
|
|
1585
|
-
foreignColumns: TArray
|
|
298
|
+
foreignKeys: alepha8.TArray<alepha8.TObject<{
|
|
299
|
+
name: alepha8.TOptional<alepha8.TString>;
|
|
300
|
+
columns: alepha8.TArray<alepha8.TString>;
|
|
301
|
+
foreignEntity: alepha8.TString;
|
|
302
|
+
foreignColumns: alepha8.TArray<alepha8.TString>;
|
|
1586
303
|
}>>;
|
|
1587
|
-
constraints: TArray
|
|
1588
|
-
name: TOptional<TString>;
|
|
1589
|
-
columns: TArray
|
|
1590
|
-
unique: TBoolean;
|
|
1591
|
-
hasCheck: TBoolean;
|
|
304
|
+
constraints: alepha8.TArray<alepha8.TObject<{
|
|
305
|
+
name: alepha8.TOptional<alepha8.TString>;
|
|
306
|
+
columns: alepha8.TArray<alepha8.TString>;
|
|
307
|
+
unique: alepha8.TBoolean;
|
|
308
|
+
hasCheck: alepha8.TBoolean;
|
|
1592
309
|
}>>;
|
|
1593
310
|
}>>;
|
|
1594
|
-
commands: TArray
|
|
1595
|
-
name: TString;
|
|
1596
|
-
description: TOptional<TString>;
|
|
1597
|
-
hidden: TOptional<TBoolean>;
|
|
311
|
+
commands: alepha8.TArray<alepha8.TObject<{
|
|
312
|
+
name: alepha8.TString;
|
|
313
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
314
|
+
hidden: alepha8.TOptional<alepha8.TBoolean>;
|
|
1598
315
|
}>>;
|
|
1599
|
-
routes: TArray
|
|
1600
|
-
method: TString;
|
|
1601
|
-
path: TString;
|
|
316
|
+
routes: alepha8.TArray<alepha8.TObject<{
|
|
317
|
+
method: alepha8.TString;
|
|
318
|
+
path: alepha8.TString;
|
|
1602
319
|
}>>;
|
|
1603
|
-
envs: TArray
|
|
1604
|
-
propertyKey: TString;
|
|
1605
|
-
schema: TAny;
|
|
1606
|
-
values: TRecord<"^.*$", TAny>;
|
|
1607
|
-
serviceName: TOptional<TString>;
|
|
320
|
+
envs: alepha8.TArray<alepha8.TObject<{
|
|
321
|
+
propertyKey: alepha8.TString;
|
|
322
|
+
schema: alepha8.TAny;
|
|
323
|
+
values: alepha8.TRecord<"^.*$", alepha8.TAny>;
|
|
324
|
+
serviceName: alepha8.TOptional<alepha8.TString>;
|
|
1608
325
|
}>>;
|
|
1609
|
-
atoms: TArray
|
|
1610
|
-
name: TString;
|
|
1611
|
-
description: TOptional<TString>;
|
|
1612
|
-
schema: TAny;
|
|
1613
|
-
defaultValue: TOptional<TAny>;
|
|
1614
|
-
currentValue: TOptional<TAny>;
|
|
326
|
+
atoms: alepha8.TArray<alepha8.TObject<{
|
|
327
|
+
name: alepha8.TString;
|
|
328
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
329
|
+
schema: alepha8.TAny;
|
|
330
|
+
defaultValue: alepha8.TOptional<alepha8.TAny>;
|
|
331
|
+
currentValue: alepha8.TOptional<alepha8.TAny>;
|
|
1615
332
|
}>>;
|
|
1616
333
|
}>;
|
|
1617
|
-
type DevMetadata = Static
|
|
334
|
+
type DevMetadata = Static<typeof devMetadataSchema>;
|
|
1618
335
|
//#endregion
|
|
1619
336
|
//#region src/api/schemas/DevModuleMetadata.d.ts
|
|
1620
|
-
declare const devModuleMetadataSchema: TObject
|
|
1621
|
-
name: TString;
|
|
1622
|
-
providers: TArray
|
|
337
|
+
declare const devModuleMetadataSchema: alepha8.TObject<{
|
|
338
|
+
name: alepha8.TString;
|
|
339
|
+
providers: alepha8.TArray<alepha8.TString>;
|
|
1623
340
|
}>;
|
|
1624
|
-
type DevModuleMetadata = Static
|
|
341
|
+
type DevModuleMetadata = Static<typeof devModuleMetadataSchema>;
|
|
1625
342
|
//#endregion
|
|
1626
343
|
//#region src/api/schemas/DevPageMetadata.d.ts
|
|
1627
|
-
declare const devPageMetadataSchema: TObject
|
|
1628
|
-
name: TString;
|
|
1629
|
-
description: TOptional<TString>;
|
|
1630
|
-
path: TOptional<TString>;
|
|
1631
|
-
params: TOptional<TAny>;
|
|
1632
|
-
query: TOptional<TAny>;
|
|
1633
|
-
hasComponent: TBoolean;
|
|
1634
|
-
hasLazy: TBoolean;
|
|
1635
|
-
hasResolve: TBoolean;
|
|
1636
|
-
hasChildren: TBoolean;
|
|
1637
|
-
hasParent: TBoolean;
|
|
1638
|
-
hasErrorHandler: TBoolean;
|
|
1639
|
-
static: TOptional<TBoolean>;
|
|
1640
|
-
cache: TOptional<TAny>;
|
|
1641
|
-
client: TOptional<TAny>;
|
|
1642
|
-
animation: TOptional<TAny>;
|
|
344
|
+
declare const devPageMetadataSchema: alepha8.TObject<{
|
|
345
|
+
name: alepha8.TString;
|
|
346
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
347
|
+
path: alepha8.TOptional<alepha8.TString>;
|
|
348
|
+
params: alepha8.TOptional<alepha8.TAny>;
|
|
349
|
+
query: alepha8.TOptional<alepha8.TAny>;
|
|
350
|
+
hasComponent: alepha8.TBoolean;
|
|
351
|
+
hasLazy: alepha8.TBoolean;
|
|
352
|
+
hasResolve: alepha8.TBoolean;
|
|
353
|
+
hasChildren: alepha8.TBoolean;
|
|
354
|
+
hasParent: alepha8.TBoolean;
|
|
355
|
+
hasErrorHandler: alepha8.TBoolean;
|
|
356
|
+
static: alepha8.TOptional<alepha8.TBoolean>;
|
|
357
|
+
cache: alepha8.TOptional<alepha8.TAny>;
|
|
358
|
+
client: alepha8.TOptional<alepha8.TAny>;
|
|
359
|
+
animation: alepha8.TOptional<alepha8.TAny>;
|
|
1643
360
|
}>;
|
|
1644
|
-
type DevPageMetadata = Static
|
|
361
|
+
type DevPageMetadata = Static<typeof devPageMetadataSchema>;
|
|
1645
362
|
//#endregion
|
|
1646
363
|
//#region src/api/schemas/DevProviderMetadata.d.ts
|
|
1647
|
-
declare const devProviderMetadataSchema: TObject
|
|
1648
|
-
name: TString;
|
|
1649
|
-
module: TOptional<TString>;
|
|
1650
|
-
dependencies: TArray
|
|
1651
|
-
aliases: TOptional<TArray
|
|
364
|
+
declare const devProviderMetadataSchema: alepha8.TObject<{
|
|
365
|
+
name: alepha8.TString;
|
|
366
|
+
module: alepha8.TOptional<alepha8.TString>;
|
|
367
|
+
dependencies: alepha8.TArray<alepha8.TString>;
|
|
368
|
+
aliases: alepha8.TOptional<alepha8.TArray<alepha8.TString>>;
|
|
1652
369
|
}>;
|
|
1653
|
-
type DevProviderMetadata = Static
|
|
370
|
+
type DevProviderMetadata = Static<typeof devProviderMetadataSchema>;
|
|
1654
371
|
//#endregion
|
|
1655
372
|
//#region src/api/schemas/DevQueueMetadata.d.ts
|
|
1656
|
-
declare const devQueueMetadataSchema: TObject
|
|
1657
|
-
name: TString;
|
|
1658
|
-
description: TOptional<TString>;
|
|
1659
|
-
schema: TOptional<TAny>;
|
|
1660
|
-
provider: TString;
|
|
373
|
+
declare const devQueueMetadataSchema: alepha8.TObject<{
|
|
374
|
+
name: alepha8.TString;
|
|
375
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
376
|
+
schema: alepha8.TOptional<alepha8.TAny>;
|
|
377
|
+
provider: alepha8.TString;
|
|
1661
378
|
}>;
|
|
1662
|
-
type DevQueueMetadata = Static
|
|
379
|
+
type DevQueueMetadata = Static<typeof devQueueMetadataSchema>;
|
|
1663
380
|
//#endregion
|
|
1664
381
|
//#region src/api/schemas/DevRealmMetadata.d.ts
|
|
1665
|
-
declare const devRealmMetadataSchema: TObject
|
|
1666
|
-
name: TString;
|
|
1667
|
-
description: TOptional<TString>;
|
|
1668
|
-
roles: TOptional<TArray
|
|
1669
|
-
type: TUnsafe<"internal" | "external">;
|
|
1670
|
-
settings: TOptional<TObject
|
|
1671
|
-
accessTokenExpiration: TOptional<TAny>;
|
|
1672
|
-
refreshTokenExpiration: TOptional<TAny>;
|
|
1673
|
-
hasOnCreateSession: TBoolean;
|
|
1674
|
-
hasOnRefreshSession: TBoolean;
|
|
1675
|
-
hasOnDeleteSession: TBoolean;
|
|
382
|
+
declare const devRealmMetadataSchema: alepha8.TObject<{
|
|
383
|
+
name: alepha8.TString;
|
|
384
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
385
|
+
roles: alepha8.TOptional<alepha8.TArray<alepha8.TAny>>;
|
|
386
|
+
type: alepha8.TUnsafe<"internal" | "external">;
|
|
387
|
+
settings: alepha8.TOptional<alepha8.TObject<{
|
|
388
|
+
accessTokenExpiration: alepha8.TOptional<alepha8.TAny>;
|
|
389
|
+
refreshTokenExpiration: alepha8.TOptional<alepha8.TAny>;
|
|
390
|
+
hasOnCreateSession: alepha8.TBoolean;
|
|
391
|
+
hasOnRefreshSession: alepha8.TBoolean;
|
|
392
|
+
hasOnDeleteSession: alepha8.TBoolean;
|
|
1676
393
|
}>>;
|
|
1677
394
|
}>;
|
|
1678
|
-
type DevRealmMetadata = Static
|
|
395
|
+
type DevRealmMetadata = Static<typeof devRealmMetadataSchema>;
|
|
1679
396
|
//#endregion
|
|
1680
397
|
//#region src/api/schemas/DevRouteMetadata.d.ts
|
|
1681
|
-
declare const devRouteMetadataSchema: TObject
|
|
1682
|
-
method: TString;
|
|
1683
|
-
path: TString;
|
|
398
|
+
declare const devRouteMetadataSchema: alepha8.TObject<{
|
|
399
|
+
method: alepha8.TString;
|
|
400
|
+
path: alepha8.TString;
|
|
1684
401
|
}>;
|
|
1685
|
-
type DevRouteMetadata = Static
|
|
402
|
+
type DevRouteMetadata = Static<typeof devRouteMetadataSchema>;
|
|
1686
403
|
//#endregion
|
|
1687
404
|
//#region src/api/schemas/DevSchedulerMetadata.d.ts
|
|
1688
|
-
declare const devSchedulerMetadataSchema: TObject
|
|
1689
|
-
name: TString;
|
|
1690
|
-
description: TOptional<TString>;
|
|
1691
|
-
cron: TOptional<TString>;
|
|
1692
|
-
interval: TOptional<TAny>;
|
|
1693
|
-
lock: TOptional<TBoolean>;
|
|
405
|
+
declare const devSchedulerMetadataSchema: alepha8.TObject<{
|
|
406
|
+
name: alepha8.TString;
|
|
407
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
408
|
+
cron: alepha8.TOptional<alepha8.TString>;
|
|
409
|
+
interval: alepha8.TOptional<alepha8.TAny>;
|
|
410
|
+
lock: alepha8.TOptional<alepha8.TBoolean>;
|
|
1694
411
|
}>;
|
|
1695
|
-
type DevSchedulerMetadata = Static
|
|
412
|
+
type DevSchedulerMetadata = Static<typeof devSchedulerMetadataSchema>;
|
|
1696
413
|
//#endregion
|
|
1697
414
|
//#region src/api/schemas/DevTopicMetadata.d.ts
|
|
1698
|
-
declare const devTopicMetadataSchema: TObject
|
|
1699
|
-
name: TString;
|
|
1700
|
-
description: TOptional<TString>;
|
|
1701
|
-
schema: TOptional<TAny>;
|
|
1702
|
-
provider: TString;
|
|
415
|
+
declare const devTopicMetadataSchema: alepha8.TObject<{
|
|
416
|
+
name: alepha8.TString;
|
|
417
|
+
description: alepha8.TOptional<alepha8.TString>;
|
|
418
|
+
schema: alepha8.TOptional<alepha8.TAny>;
|
|
419
|
+
provider: alepha8.TString;
|
|
1703
420
|
}>;
|
|
1704
|
-
type DevTopicMetadata = Static
|
|
421
|
+
type DevTopicMetadata = Static<typeof devTopicMetadataSchema>;
|
|
1705
422
|
//#endregion
|
|
1706
423
|
//#region src/api/providers/DevToolsMetadataProvider.d.ts
|
|
1707
424
|
declare class DevToolsMetadataProvider {
|
|
1708
425
|
protected readonly alepha: Alepha;
|
|
1709
|
-
protected readonly log: Logger;
|
|
426
|
+
protected readonly log: alepha_logger0.Logger;
|
|
1710
427
|
getActions(): DevActionMetadata[];
|
|
1711
428
|
getQueues(): DevQueueMetadata[];
|
|
1712
429
|
getSchedulers(): DevSchedulerMetadata[];
|
|
@@ -1718,8 +435,8 @@ declare class DevToolsMetadataProvider {
|
|
|
1718
435
|
getProviders(): DevProviderMetadata[];
|
|
1719
436
|
getModules(): DevModuleMetadata[];
|
|
1720
437
|
getEntities(): DevEntityMetadata[];
|
|
1721
|
-
protected getColumnType(field: TSchema
|
|
1722
|
-
protected isNullable(field: TSchema
|
|
438
|
+
protected getColumnType(field: TSchema): string;
|
|
439
|
+
protected isNullable(field: TSchema): boolean;
|
|
1723
440
|
getCommands(): DevCommandMetadata[];
|
|
1724
441
|
getRoutes(): DevRouteMetadata[];
|
|
1725
442
|
getEnvs(): DevEnvMetadata[];
|
|
@@ -1738,7 +455,7 @@ declare class DevToolsMetadataProvider {
|
|
|
1738
455
|
* @see {@link DevToolsMetadataProvider}
|
|
1739
456
|
* @module alepha.devtools
|
|
1740
457
|
*/
|
|
1741
|
-
declare const AlephaDevtools: Service<Module>;
|
|
458
|
+
declare const AlephaDevtools: alepha8.Service<alepha8.Module>;
|
|
1742
459
|
//#endregion
|
|
1743
460
|
export { AlephaDevtools, DevActionMetadata, DevBucketMetadata, DevCacheMetadata, DevCommandMetadata, DevEntityColumn, DevEntityConstraint, DevEntityForeignKey, DevEntityIndex, DevEntityMetadata, DevMetadata, DevModuleMetadata, DevPageMetadata, DevProviderMetadata, DevQueueMetadata, DevRealmMetadata, DevRouteMetadata, DevSchedulerMetadata, DevToolsMetadataProvider, DevTopicMetadata, devActionMetadataSchema, devBucketMetadataSchema, devCacheMetadataSchema, devCommandMetadataSchema, devEntityColumnSchema, devEntityConstraintSchema, devEntityForeignKeySchema, devEntityIndexSchema, devEntityMetadataSchema, devMetadataSchema, devModuleMetadataSchema, devPageMetadataSchema, devProviderMetadataSchema, devQueueMetadataSchema, devRealmMetadataSchema, devRouteMetadataSchema, devSchedulerMetadataSchema, devTopicMetadataSchema };
|
|
1744
461
|
//# sourceMappingURL=index.d.ts.map
|