alepha 0.11.7 → 0.11.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -17
- package/dist/index.cjs +15805 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +15804 -0
- package/dist/index.js.map +1 -0
- package/package.json +36 -372
- package/src/assets/biomeJson.ts +33 -0
- package/src/assets/tsconfigJson.ts +17 -0
- package/src/assets/viteConfigTs.ts +14 -0
- package/src/commands/BiomeCommands.ts +60 -0
- package/src/commands/CoreCommands.ts +266 -0
- package/src/commands/DrizzleCommands.ts +403 -0
- package/src/commands/VerifyCommands.ts +48 -0
- package/src/commands/ViteCommands.ts +152 -0
- package/src/index.ts +35 -0
- package/src/services/ProcessRunner.ts +89 -0
- package/src/version.ts +7 -0
- package/api/files.cjs +0 -8
- package/api/files.d.ts +0 -438
- package/api/files.js +0 -1
- package/api/jobs.cjs +0 -8
- package/api/jobs.d.ts +0 -327
- package/api/jobs.js +0 -1
- package/api/notifications.cjs +0 -8
- package/api/notifications.d.ts +0 -263
- package/api/notifications.js +0 -1
- package/api/users.cjs +0 -8
- package/api/users.d.ts +0 -923
- package/api/users.js +0 -1
- package/api/verifications.cjs +0 -8
- package/api/verifications.d.ts +0 -1
- package/api/verifications.js +0 -1
- package/batch.cjs +0 -8
- package/batch.d.ts +0 -154
- package/batch.js +0 -1
- package/bucket.cjs +0 -8
- package/bucket.d.ts +0 -520
- package/bucket.js +0 -1
- package/cache/redis.cjs +0 -8
- package/cache/redis.d.ts +0 -40
- package/cache/redis.js +0 -1
- package/cache.cjs +0 -8
- package/cache.d.ts +0 -288
- package/cache.js +0 -1
- package/command.cjs +0 -8
- package/command.d.ts +0 -269
- package/command.js +0 -1
- package/core.cjs +0 -8
- package/core.d.ts +0 -1904
- package/core.js +0 -1
- package/datetime.cjs +0 -8
- package/datetime.d.ts +0 -144
- package/datetime.js +0 -1
- package/devtools.cjs +0 -8
- package/devtools.d.ts +0 -252
- package/devtools.js +0 -1
- package/email.cjs +0 -8
- package/email.d.ts +0 -187
- package/email.js +0 -1
- package/fake.cjs +0 -8
- package/fake.d.ts +0 -73
- package/fake.js +0 -1
- package/file.cjs +0 -8
- package/file.d.ts +0 -528
- package/file.js +0 -1
- package/lock/redis.cjs +0 -8
- package/lock/redis.d.ts +0 -24
- package/lock/redis.js +0 -1
- package/lock.cjs +0 -8
- package/lock.d.ts +0 -552
- package/lock.js +0 -1
- package/logger.cjs +0 -8
- package/logger.d.ts +0 -287
- package/logger.js +0 -1
- package/postgres.cjs +0 -8
- package/postgres.d.ts +0 -2143
- package/postgres.js +0 -1
- package/queue/redis.cjs +0 -8
- package/queue/redis.d.ts +0 -29
- package/queue/redis.js +0 -1
- package/queue.cjs +0 -8
- package/queue.d.ts +0 -760
- package/queue.js +0 -1
- package/react/auth.cjs +0 -8
- package/react/auth.d.ts +0 -504
- package/react/auth.js +0 -1
- package/react/form.cjs +0 -8
- package/react/form.d.ts +0 -211
- package/react/form.js +0 -1
- package/react/head.cjs +0 -8
- package/react/head.d.ts +0 -120
- package/react/head.js +0 -1
- package/react/i18n.cjs +0 -8
- package/react/i18n.d.ts +0 -168
- package/react/i18n.js +0 -1
- package/react.cjs +0 -8
- package/react.d.ts +0 -1263
- package/react.js +0 -1
- package/redis.cjs +0 -8
- package/redis.d.ts +0 -82
- package/redis.js +0 -1
- package/retry.cjs +0 -8
- package/retry.d.ts +0 -162
- package/retry.js +0 -1
- package/router.cjs +0 -8
- package/router.d.ts +0 -45
- package/router.js +0 -1
- package/scheduler.cjs +0 -8
- package/scheduler.d.ts +0 -145
- package/scheduler.js +0 -1
- package/security.cjs +0 -8
- package/security.d.ts +0 -586
- package/security.js +0 -1
- package/server/cache.cjs +0 -8
- package/server/cache.d.ts +0 -163
- package/server/cache.js +0 -1
- package/server/compress.cjs +0 -8
- package/server/compress.d.ts +0 -38
- package/server/compress.js +0 -1
- package/server/cookies.cjs +0 -8
- package/server/cookies.d.ts +0 -144
- package/server/cookies.js +0 -1
- package/server/cors.cjs +0 -8
- package/server/cors.d.ts +0 -45
- package/server/cors.js +0 -1
- package/server/health.cjs +0 -8
- package/server/health.d.ts +0 -58
- package/server/health.js +0 -1
- package/server/helmet.cjs +0 -8
- package/server/helmet.d.ts +0 -98
- package/server/helmet.js +0 -1
- package/server/links.cjs +0 -8
- package/server/links.d.ts +0 -322
- package/server/links.js +0 -1
- package/server/metrics.cjs +0 -8
- package/server/metrics.d.ts +0 -35
- package/server/metrics.js +0 -1
- package/server/multipart.cjs +0 -8
- package/server/multipart.d.ts +0 -42
- package/server/multipart.js +0 -1
- package/server/proxy.cjs +0 -8
- package/server/proxy.d.ts +0 -234
- package/server/proxy.js +0 -1
- package/server/security.cjs +0 -8
- package/server/security.d.ts +0 -92
- package/server/security.js +0 -1
- package/server/static.cjs +0 -8
- package/server/static.d.ts +0 -119
- package/server/static.js +0 -1
- package/server/swagger.cjs +0 -8
- package/server/swagger.d.ts +0 -161
- package/server/swagger.js +0 -1
- package/server.cjs +0 -8
- package/server.d.ts +0 -849
- package/server.js +0 -1
- package/topic/redis.cjs +0 -8
- package/topic/redis.d.ts +0 -42
- package/topic/redis.js +0 -1
- package/topic.cjs +0 -8
- package/topic.d.ts +0 -819
- package/topic.js +0 -1
- package/ui.cjs +0 -8
- package/ui.d.ts +0 -813
- package/ui.js +0 -1
- package/vite.cjs +0 -8
- package/vite.d.ts +0 -186
- package/vite.js +0 -1
package/core.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@alepha/core'
|
package/datetime.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var m = require('@alepha/datetime');
|
|
3
|
-
Object.keys(m).forEach(function (k) {
|
|
4
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
5
|
-
enumerable: true,
|
|
6
|
-
get: function () { return m[k]; }
|
|
7
|
-
});
|
|
8
|
-
});
|
package/datetime.d.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import * as _alepha_core1 from "alepha";
|
|
2
|
-
import { Alepha, Descriptor, KIND } from "alepha";
|
|
3
|
-
import "dayjs/plugin/relativeTime.js";
|
|
4
|
-
import dayjsDuration from "dayjs/plugin/duration.js";
|
|
5
|
-
import "dayjs/plugin/utc.js";
|
|
6
|
-
import "dayjs/plugin/timezone.js";
|
|
7
|
-
import "dayjs/plugin/localizedFormat.js";
|
|
8
|
-
import "dayjs/locale/ar.js";
|
|
9
|
-
import "dayjs/locale/fr.js";
|
|
10
|
-
import DayjsApi, { Dayjs, ManipulateType, PluginFunc } from "dayjs";
|
|
11
|
-
|
|
12
|
-
//#region src/providers/DateTimeProvider.d.ts
|
|
13
|
-
type DateTime = DayjsApi.Dayjs;
|
|
14
|
-
type Duration = dayjsDuration.Duration;
|
|
15
|
-
type DurationLike = number | dayjsDuration.Duration | [number, ManipulateType];
|
|
16
|
-
declare const dayjs: typeof DayjsApi;
|
|
17
|
-
declare const isDateTime: (value: unknown) => value is DateTime;
|
|
18
|
-
declare class DateTimeProvider {
|
|
19
|
-
static PLUGINS: Array<PluginFunc<any>>;
|
|
20
|
-
protected alepha: Alepha;
|
|
21
|
-
protected ref: DateTime | null;
|
|
22
|
-
protected readonly timeouts: Timeout[];
|
|
23
|
-
protected readonly intervals: Interval[];
|
|
24
|
-
constructor();
|
|
25
|
-
protected readonly onStart: _alepha_core1.HookDescriptor<"start">;
|
|
26
|
-
protected readonly onStop: _alepha_core1.HookDescriptor<"stop">;
|
|
27
|
-
setLocale(locale: string): void;
|
|
28
|
-
isDateTime(value: unknown): value is DateTime;
|
|
29
|
-
/**
|
|
30
|
-
* Create a new UTC DateTime instance.
|
|
31
|
-
*/
|
|
32
|
-
utc(date: string | number | Date | Dayjs | null | undefined): DateTime;
|
|
33
|
-
/**
|
|
34
|
-
* Create a new DateTime instance.
|
|
35
|
-
*/
|
|
36
|
-
of(date: string | number | Date | Dayjs | null | undefined): DateTime;
|
|
37
|
-
/**
|
|
38
|
-
* Get the current date.
|
|
39
|
-
*/
|
|
40
|
-
now(): DateTime;
|
|
41
|
-
/**
|
|
42
|
-
* Get the current date as a string.
|
|
43
|
-
*
|
|
44
|
-
* @param date
|
|
45
|
-
*/
|
|
46
|
-
toISOString(date?: Date | string | DateTime): string;
|
|
47
|
-
/**
|
|
48
|
-
* Get the current date as a string.
|
|
49
|
-
*/
|
|
50
|
-
nowISOString(): string;
|
|
51
|
-
/**
|
|
52
|
-
* Get the current date as a string.
|
|
53
|
-
*
|
|
54
|
-
* @protected
|
|
55
|
-
*/
|
|
56
|
-
protected getCurrentDate(): DateTime;
|
|
57
|
-
/**
|
|
58
|
-
* Create a new Duration instance.
|
|
59
|
-
*/
|
|
60
|
-
duration: (duration: DurationLike, unit?: ManipulateType) => Duration;
|
|
61
|
-
isDurationLike(value: unknown): value is DurationLike;
|
|
62
|
-
/**
|
|
63
|
-
* Return a promise that resolves after the next tick.
|
|
64
|
-
* It uses `setTimeout` with 0 ms delay.
|
|
65
|
-
*/
|
|
66
|
-
tick(): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Wait for a certain duration.
|
|
69
|
-
*
|
|
70
|
-
* You can clear the timeout by using the `AbortSignal` API.
|
|
71
|
-
* Aborted signal will resolve the promise immediately, it does not reject it.
|
|
72
|
-
*/
|
|
73
|
-
wait(duration: DurationLike, options?: {
|
|
74
|
-
signal?: AbortSignal;
|
|
75
|
-
now?: number;
|
|
76
|
-
}): Promise<void>;
|
|
77
|
-
createInterval(run: () => unknown, distance: DurationLike, start?: boolean): Interval;
|
|
78
|
-
/**
|
|
79
|
-
* Run a callback after a certain duration.
|
|
80
|
-
*/
|
|
81
|
-
createTimeout(callback: () => void, duration: DurationLike, now?: number): Timeout;
|
|
82
|
-
clearTimeout(timeout: Timeout): void;
|
|
83
|
-
clearInterval(interval: Interval): void;
|
|
84
|
-
/**
|
|
85
|
-
* Run a function with a deadline.
|
|
86
|
-
*/
|
|
87
|
-
deadline<T>(fn: (signal: AbortSignal) => Promise<T>, duration: DurationLike): Promise<T>;
|
|
88
|
-
/**
|
|
89
|
-
* Add time to the current date.
|
|
90
|
-
*/
|
|
91
|
-
travel(duration: DurationLike, unit?: ManipulateType): Promise<void>;
|
|
92
|
-
/**
|
|
93
|
-
* Stop the time.
|
|
94
|
-
*/
|
|
95
|
-
pause(): DateTime;
|
|
96
|
-
/**
|
|
97
|
-
* Reset the reference date.
|
|
98
|
-
*/
|
|
99
|
-
reset(): void;
|
|
100
|
-
}
|
|
101
|
-
interface Interval {
|
|
102
|
-
timer?: any;
|
|
103
|
-
duration: number;
|
|
104
|
-
run: () => unknown;
|
|
105
|
-
}
|
|
106
|
-
interface Timeout {
|
|
107
|
-
now: number;
|
|
108
|
-
timer?: any;
|
|
109
|
-
duration: number;
|
|
110
|
-
callback: () => void;
|
|
111
|
-
clear: () => void;
|
|
112
|
-
}
|
|
113
|
-
//#endregion
|
|
114
|
-
//#region src/descriptors/$interval.d.ts
|
|
115
|
-
/**
|
|
116
|
-
* Run a function periodically.
|
|
117
|
-
* It uses the `setInterval` internally.
|
|
118
|
-
* It starts by default when the context starts and stops when the context stops.
|
|
119
|
-
*/
|
|
120
|
-
declare const $interval: {
|
|
121
|
-
(options: IntervalDescriptorOptions): IntervalDescriptor;
|
|
122
|
-
[KIND]: typeof IntervalDescriptor;
|
|
123
|
-
};
|
|
124
|
-
interface IntervalDescriptorOptions {
|
|
125
|
-
/**
|
|
126
|
-
* The interval handler.
|
|
127
|
-
*/
|
|
128
|
-
handler: () => unknown;
|
|
129
|
-
/**
|
|
130
|
-
* The interval duration.
|
|
131
|
-
*/
|
|
132
|
-
duration: DurationLike;
|
|
133
|
-
}
|
|
134
|
-
declare class IntervalDescriptor extends Descriptor<IntervalDescriptorOptions> {
|
|
135
|
-
protected readonly dateTimeProvider: DateTimeProvider;
|
|
136
|
-
called: number;
|
|
137
|
-
protected onInit(): void;
|
|
138
|
-
}
|
|
139
|
-
//#endregion
|
|
140
|
-
//#region src/index.d.ts
|
|
141
|
-
declare const AlephaDateTime: _alepha_core1.Service<_alepha_core1.Module>;
|
|
142
|
-
//#endregion
|
|
143
|
-
export { $interval, AlephaDateTime, DateTime, DateTimeProvider, Duration, DurationLike, Interval, IntervalDescriptor, IntervalDescriptorOptions, Timeout, dayjs, isDateTime };
|
|
144
|
-
//# sourceMappingURL=index.d.ts.map
|
package/datetime.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@alepha/datetime'
|
package/devtools.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var m = require('@alepha/devtools');
|
|
3
|
-
Object.keys(m).forEach(function (k) {
|
|
4
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
5
|
-
enumerable: true,
|
|
6
|
-
get: function () { return m[k]; }
|
|
7
|
-
});
|
|
8
|
-
});
|
package/devtools.d.ts
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import * as _alepha_core0 from "alepha";
|
|
2
|
-
import { Alepha, Static } from "alepha";
|
|
3
|
-
import * as _alepha_logger0 from "alepha/logger";
|
|
4
|
-
import * as typebox9 from "typebox";
|
|
5
|
-
|
|
6
|
-
//#region src/schemas/DevActionMetadata.d.ts
|
|
7
|
-
declare const devActionMetadataSchema: typebox9.TObject<{
|
|
8
|
-
name: typebox9.TString;
|
|
9
|
-
group: typebox9.TString;
|
|
10
|
-
method: typebox9.TString;
|
|
11
|
-
path: typebox9.TString;
|
|
12
|
-
prefix: typebox9.TString;
|
|
13
|
-
fullPath: typebox9.TString;
|
|
14
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
15
|
-
summary: typebox9.TOptional<typebox9.TString>;
|
|
16
|
-
disabled: typebox9.TOptional<typebox9.TBoolean>;
|
|
17
|
-
secure: typebox9.TOptional<typebox9.TBoolean>;
|
|
18
|
-
hide: typebox9.TOptional<typebox9.TBoolean>;
|
|
19
|
-
body: typebox9.TOptional<typebox9.TAny>;
|
|
20
|
-
params: typebox9.TOptional<typebox9.TAny>;
|
|
21
|
-
query: typebox9.TOptional<typebox9.TAny>;
|
|
22
|
-
response: typebox9.TOptional<typebox9.TAny>;
|
|
23
|
-
bodyContentType: typebox9.TOptional<typebox9.TString>;
|
|
24
|
-
}>;
|
|
25
|
-
type DevActionMetadata = Static<typeof devActionMetadataSchema>;
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/schemas/DevBucketMetadata.d.ts
|
|
28
|
-
declare const devBucketMetadataSchema: typebox9.TObject<{
|
|
29
|
-
name: typebox9.TString;
|
|
30
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
31
|
-
mimeTypes: typebox9.TOptional<typebox9.TArray<typebox9.TString>>;
|
|
32
|
-
maxSize: typebox9.TOptional<typebox9.TNumber>;
|
|
33
|
-
provider: typebox9.TString;
|
|
34
|
-
}>;
|
|
35
|
-
type DevBucketMetadata = Static<typeof devBucketMetadataSchema>;
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/schemas/DevCacheMetadata.d.ts
|
|
38
|
-
declare const devCacheMetadataSchema: typebox9.TObject<{
|
|
39
|
-
name: typebox9.TString;
|
|
40
|
-
ttl: typebox9.TOptional<typebox9.TAny>;
|
|
41
|
-
disabled: typebox9.TOptional<typebox9.TBoolean>;
|
|
42
|
-
provider: typebox9.TString;
|
|
43
|
-
}>;
|
|
44
|
-
type DevCacheMetadata = Static<typeof devCacheMetadataSchema>;
|
|
45
|
-
//#endregion
|
|
46
|
-
//#region src/schemas/DevMetadata.d.ts
|
|
47
|
-
declare const devMetadataSchema: typebox9.TObject<{
|
|
48
|
-
actions: typebox9.TArray<typebox9.TObject<{
|
|
49
|
-
name: typebox9.TString;
|
|
50
|
-
group: typebox9.TString;
|
|
51
|
-
method: typebox9.TString;
|
|
52
|
-
path: typebox9.TString;
|
|
53
|
-
prefix: typebox9.TString;
|
|
54
|
-
fullPath: typebox9.TString;
|
|
55
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
56
|
-
summary: typebox9.TOptional<typebox9.TString>;
|
|
57
|
-
disabled: typebox9.TOptional<typebox9.TBoolean>;
|
|
58
|
-
secure: typebox9.TOptional<typebox9.TBoolean>;
|
|
59
|
-
hide: typebox9.TOptional<typebox9.TBoolean>;
|
|
60
|
-
body: typebox9.TOptional<typebox9.TAny>;
|
|
61
|
-
params: typebox9.TOptional<typebox9.TAny>;
|
|
62
|
-
query: typebox9.TOptional<typebox9.TAny>;
|
|
63
|
-
response: typebox9.TOptional<typebox9.TAny>;
|
|
64
|
-
bodyContentType: typebox9.TOptional<typebox9.TString>;
|
|
65
|
-
}>>;
|
|
66
|
-
queues: typebox9.TArray<typebox9.TObject<{
|
|
67
|
-
name: typebox9.TString;
|
|
68
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
69
|
-
schema: typebox9.TOptional<typebox9.TAny>;
|
|
70
|
-
provider: typebox9.TString;
|
|
71
|
-
}>>;
|
|
72
|
-
schedulers: typebox9.TArray<typebox9.TObject<{
|
|
73
|
-
name: typebox9.TString;
|
|
74
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
75
|
-
cron: typebox9.TOptional<typebox9.TString>;
|
|
76
|
-
interval: typebox9.TOptional<typebox9.TAny>;
|
|
77
|
-
lock: typebox9.TOptional<typebox9.TBoolean>;
|
|
78
|
-
}>>;
|
|
79
|
-
topics: typebox9.TArray<typebox9.TObject<{
|
|
80
|
-
name: typebox9.TString;
|
|
81
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
82
|
-
schema: typebox9.TOptional<typebox9.TAny>;
|
|
83
|
-
provider: typebox9.TString;
|
|
84
|
-
}>>;
|
|
85
|
-
buckets: typebox9.TArray<typebox9.TObject<{
|
|
86
|
-
name: typebox9.TString;
|
|
87
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
88
|
-
mimeTypes: typebox9.TOptional<typebox9.TArray<typebox9.TString>>;
|
|
89
|
-
maxSize: typebox9.TOptional<typebox9.TNumber>;
|
|
90
|
-
provider: typebox9.TString;
|
|
91
|
-
}>>;
|
|
92
|
-
realms: typebox9.TArray<typebox9.TObject<{
|
|
93
|
-
name: typebox9.TString;
|
|
94
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
95
|
-
roles: typebox9.TOptional<typebox9.TArray<typebox9.TAny>>;
|
|
96
|
-
type: typebox9.TUnsafe<"internal" | "external">;
|
|
97
|
-
settings: typebox9.TOptional<typebox9.TObject<{
|
|
98
|
-
accessTokenExpiration: typebox9.TOptional<typebox9.TAny>;
|
|
99
|
-
refreshTokenExpiration: typebox9.TOptional<typebox9.TAny>;
|
|
100
|
-
hasOnCreateSession: typebox9.TBoolean;
|
|
101
|
-
hasOnRefreshSession: typebox9.TBoolean;
|
|
102
|
-
hasOnDeleteSession: typebox9.TBoolean;
|
|
103
|
-
}>>;
|
|
104
|
-
}>>;
|
|
105
|
-
caches: typebox9.TArray<typebox9.TObject<{
|
|
106
|
-
name: typebox9.TString;
|
|
107
|
-
ttl: typebox9.TOptional<typebox9.TAny>;
|
|
108
|
-
disabled: typebox9.TOptional<typebox9.TBoolean>;
|
|
109
|
-
provider: typebox9.TString;
|
|
110
|
-
}>>;
|
|
111
|
-
pages: typebox9.TArray<typebox9.TObject<{
|
|
112
|
-
name: typebox9.TString;
|
|
113
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
114
|
-
path: typebox9.TOptional<typebox9.TString>;
|
|
115
|
-
params: typebox9.TOptional<typebox9.TAny>;
|
|
116
|
-
query: typebox9.TOptional<typebox9.TAny>;
|
|
117
|
-
hasComponent: typebox9.TBoolean;
|
|
118
|
-
hasLazy: typebox9.TBoolean;
|
|
119
|
-
hasResolve: typebox9.TBoolean;
|
|
120
|
-
hasChildren: typebox9.TBoolean;
|
|
121
|
-
hasParent: typebox9.TBoolean;
|
|
122
|
-
hasErrorHandler: typebox9.TBoolean;
|
|
123
|
-
static: typebox9.TOptional<typebox9.TBoolean>;
|
|
124
|
-
cache: typebox9.TOptional<typebox9.TAny>;
|
|
125
|
-
client: typebox9.TOptional<typebox9.TAny>;
|
|
126
|
-
animation: typebox9.TOptional<typebox9.TAny>;
|
|
127
|
-
}>>;
|
|
128
|
-
providers: typebox9.TArray<typebox9.TObject<{
|
|
129
|
-
name: typebox9.TString;
|
|
130
|
-
module: typebox9.TOptional<typebox9.TString>;
|
|
131
|
-
dependencies: typebox9.TArray<typebox9.TString>;
|
|
132
|
-
aliases: typebox9.TOptional<typebox9.TArray<typebox9.TString>>;
|
|
133
|
-
}>>;
|
|
134
|
-
modules: typebox9.TArray<typebox9.TObject<{
|
|
135
|
-
name: typebox9.TString;
|
|
136
|
-
providers: typebox9.TArray<typebox9.TString>;
|
|
137
|
-
}>>;
|
|
138
|
-
}>;
|
|
139
|
-
type DevMetadata = Static<typeof devMetadataSchema>;
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region src/schemas/DevModuleMetadata.d.ts
|
|
142
|
-
declare const devModuleMetadataSchema: typebox9.TObject<{
|
|
143
|
-
name: typebox9.TString;
|
|
144
|
-
providers: typebox9.TArray<typebox9.TString>;
|
|
145
|
-
}>;
|
|
146
|
-
type DevModuleMetadata = Static<typeof devModuleMetadataSchema>;
|
|
147
|
-
//#endregion
|
|
148
|
-
//#region src/schemas/DevPageMetadata.d.ts
|
|
149
|
-
declare const devPageMetadataSchema: typebox9.TObject<{
|
|
150
|
-
name: typebox9.TString;
|
|
151
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
152
|
-
path: typebox9.TOptional<typebox9.TString>;
|
|
153
|
-
params: typebox9.TOptional<typebox9.TAny>;
|
|
154
|
-
query: typebox9.TOptional<typebox9.TAny>;
|
|
155
|
-
hasComponent: typebox9.TBoolean;
|
|
156
|
-
hasLazy: typebox9.TBoolean;
|
|
157
|
-
hasResolve: typebox9.TBoolean;
|
|
158
|
-
hasChildren: typebox9.TBoolean;
|
|
159
|
-
hasParent: typebox9.TBoolean;
|
|
160
|
-
hasErrorHandler: typebox9.TBoolean;
|
|
161
|
-
static: typebox9.TOptional<typebox9.TBoolean>;
|
|
162
|
-
cache: typebox9.TOptional<typebox9.TAny>;
|
|
163
|
-
client: typebox9.TOptional<typebox9.TAny>;
|
|
164
|
-
animation: typebox9.TOptional<typebox9.TAny>;
|
|
165
|
-
}>;
|
|
166
|
-
type DevPageMetadata = Static<typeof devPageMetadataSchema>;
|
|
167
|
-
//#endregion
|
|
168
|
-
//#region src/schemas/DevProviderMetadata.d.ts
|
|
169
|
-
declare const devProviderMetadataSchema: typebox9.TObject<{
|
|
170
|
-
name: typebox9.TString;
|
|
171
|
-
module: typebox9.TOptional<typebox9.TString>;
|
|
172
|
-
dependencies: typebox9.TArray<typebox9.TString>;
|
|
173
|
-
aliases: typebox9.TOptional<typebox9.TArray<typebox9.TString>>;
|
|
174
|
-
}>;
|
|
175
|
-
type DevProviderMetadata = Static<typeof devProviderMetadataSchema>;
|
|
176
|
-
//#endregion
|
|
177
|
-
//#region src/schemas/DevQueueMetadata.d.ts
|
|
178
|
-
declare const devQueueMetadataSchema: typebox9.TObject<{
|
|
179
|
-
name: typebox9.TString;
|
|
180
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
181
|
-
schema: typebox9.TOptional<typebox9.TAny>;
|
|
182
|
-
provider: typebox9.TString;
|
|
183
|
-
}>;
|
|
184
|
-
type DevQueueMetadata = Static<typeof devQueueMetadataSchema>;
|
|
185
|
-
//#endregion
|
|
186
|
-
//#region src/schemas/DevRealmMetadata.d.ts
|
|
187
|
-
declare const devRealmMetadataSchema: typebox9.TObject<{
|
|
188
|
-
name: typebox9.TString;
|
|
189
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
190
|
-
roles: typebox9.TOptional<typebox9.TArray<typebox9.TAny>>;
|
|
191
|
-
type: typebox9.TUnsafe<"internal" | "external">;
|
|
192
|
-
settings: typebox9.TOptional<typebox9.TObject<{
|
|
193
|
-
accessTokenExpiration: typebox9.TOptional<typebox9.TAny>;
|
|
194
|
-
refreshTokenExpiration: typebox9.TOptional<typebox9.TAny>;
|
|
195
|
-
hasOnCreateSession: typebox9.TBoolean;
|
|
196
|
-
hasOnRefreshSession: typebox9.TBoolean;
|
|
197
|
-
hasOnDeleteSession: typebox9.TBoolean;
|
|
198
|
-
}>>;
|
|
199
|
-
}>;
|
|
200
|
-
type DevRealmMetadata = Static<typeof devRealmMetadataSchema>;
|
|
201
|
-
//#endregion
|
|
202
|
-
//#region src/schemas/DevSchedulerMetadata.d.ts
|
|
203
|
-
declare const devSchedulerMetadataSchema: typebox9.TObject<{
|
|
204
|
-
name: typebox9.TString;
|
|
205
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
206
|
-
cron: typebox9.TOptional<typebox9.TString>;
|
|
207
|
-
interval: typebox9.TOptional<typebox9.TAny>;
|
|
208
|
-
lock: typebox9.TOptional<typebox9.TBoolean>;
|
|
209
|
-
}>;
|
|
210
|
-
type DevSchedulerMetadata = Static<typeof devSchedulerMetadataSchema>;
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region src/schemas/DevTopicMetadata.d.ts
|
|
213
|
-
declare const devTopicMetadataSchema: typebox9.TObject<{
|
|
214
|
-
name: typebox9.TString;
|
|
215
|
-
description: typebox9.TOptional<typebox9.TString>;
|
|
216
|
-
schema: typebox9.TOptional<typebox9.TAny>;
|
|
217
|
-
provider: typebox9.TString;
|
|
218
|
-
}>;
|
|
219
|
-
type DevTopicMetadata = Static<typeof devTopicMetadataSchema>;
|
|
220
|
-
//#endregion
|
|
221
|
-
//#region src/providers/DevToolsMetadataProvider.d.ts
|
|
222
|
-
declare class DevToolsMetadataProvider {
|
|
223
|
-
protected readonly alepha: Alepha;
|
|
224
|
-
protected readonly log: _alepha_logger0.Logger;
|
|
225
|
-
getActions(): DevActionMetadata[];
|
|
226
|
-
getQueues(): DevQueueMetadata[];
|
|
227
|
-
getSchedulers(): DevSchedulerMetadata[];
|
|
228
|
-
getTopics(): DevTopicMetadata[];
|
|
229
|
-
getBuckets(): DevBucketMetadata[];
|
|
230
|
-
getRealms(): DevRealmMetadata[];
|
|
231
|
-
getCaches(): DevCacheMetadata[];
|
|
232
|
-
getPages(): DevPageMetadata[];
|
|
233
|
-
getProviders(): DevProviderMetadata[];
|
|
234
|
-
getModules(): DevModuleMetadata[];
|
|
235
|
-
getMetadata(): DevMetadata;
|
|
236
|
-
protected getProviderName(provider?: "memory" | any): string;
|
|
237
|
-
}
|
|
238
|
-
//#endregion
|
|
239
|
-
//#region src/index.d.ts
|
|
240
|
-
/**
|
|
241
|
-
* Developer tools module for monitoring and debugging Alepha applications.
|
|
242
|
-
*
|
|
243
|
-
* This module provides comprehensive data collection capabilities for tracking application behavior,
|
|
244
|
-
* performance metrics, and debugging information in real-time.
|
|
245
|
-
*
|
|
246
|
-
* @see {@link DevToolsMetadataProvider}
|
|
247
|
-
* @module alepha.devtools
|
|
248
|
-
*/
|
|
249
|
-
declare const AlephaDevtools: _alepha_core0.Service<_alepha_core0.Module>;
|
|
250
|
-
//#endregion
|
|
251
|
-
export { AlephaDevtools, DevActionMetadata, DevBucketMetadata, DevCacheMetadata, DevMetadata, DevModuleMetadata, DevPageMetadata, DevProviderMetadata, DevQueueMetadata, DevRealmMetadata, DevSchedulerMetadata, DevToolsMetadataProvider, DevTopicMetadata, devActionMetadataSchema, devBucketMetadataSchema, devCacheMetadataSchema, devMetadataSchema, devModuleMetadataSchema, devPageMetadataSchema, devProviderMetadataSchema, devQueueMetadataSchema, devRealmMetadataSchema, devSchedulerMetadataSchema, devTopicMetadataSchema };
|
|
252
|
-
//# sourceMappingURL=index.d.ts.map
|
package/devtools.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@alepha/devtools'
|
package/email.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var m = require('@alepha/email');
|
|
3
|
-
Object.keys(m).forEach(function (k) {
|
|
4
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
5
|
-
enumerable: true,
|
|
6
|
-
get: function () { return m[k]; }
|
|
7
|
-
});
|
|
8
|
-
});
|
package/email.d.ts
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import * as _alepha_core1 from "alepha";
|
|
2
|
-
import { Descriptor, InstantiableClass, KIND } from "alepha";
|
|
3
|
-
import * as _alepha_logger0 from "alepha/logger";
|
|
4
|
-
import { Transporter } from "nodemailer";
|
|
5
|
-
|
|
6
|
-
//#region src/providers/EmailProvider.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Email provider interface.
|
|
9
|
-
*
|
|
10
|
-
* All methods are asynchronous and return promises.
|
|
11
|
-
*/
|
|
12
|
-
declare abstract class EmailProvider {
|
|
13
|
-
/**
|
|
14
|
-
* Send an email.
|
|
15
|
-
*
|
|
16
|
-
* @return Promise that resolves when the email is sent.
|
|
17
|
-
*/
|
|
18
|
-
abstract send(options: EmailSendOptions): Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
type EmailSendOptions = {
|
|
21
|
-
to: string | string[];
|
|
22
|
-
subject: string;
|
|
23
|
-
body: string;
|
|
24
|
-
};
|
|
25
|
-
//#endregion
|
|
26
|
-
//#region src/descriptors/$email.d.ts
|
|
27
|
-
declare const $email: {
|
|
28
|
-
(options?: EmailDescriptorOptions): EmailDescriptor;
|
|
29
|
-
[KIND]: typeof EmailDescriptor;
|
|
30
|
-
};
|
|
31
|
-
interface EmailDescriptorOptions {
|
|
32
|
-
name?: string;
|
|
33
|
-
provider?: InstantiableClass<EmailProvider> | "memory";
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Email descriptor for sending emails through various providers.
|
|
37
|
-
*
|
|
38
|
-
* Usage:
|
|
39
|
-
* ```typescript
|
|
40
|
-
* class MyService {
|
|
41
|
-
* private readonly welcomeEmail = $email({ name: "welcome" });
|
|
42
|
-
*
|
|
43
|
-
* async sendWelcome(userEmail: string, userName: string) {
|
|
44
|
-
* await this.welcomeEmail.send({
|
|
45
|
-
* to: userEmail,
|
|
46
|
-
* subject: "Welcome!",
|
|
47
|
-
* body: `<p>Hello ${userName}!</p>`
|
|
48
|
-
* });
|
|
49
|
-
* }
|
|
50
|
-
* }
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
declare class EmailDescriptor extends Descriptor<EmailDescriptorOptions> {
|
|
54
|
-
protected readonly provider: EmailProvider;
|
|
55
|
-
get name(): string;
|
|
56
|
-
/**
|
|
57
|
-
* Send an email using the configured provider.
|
|
58
|
-
*/
|
|
59
|
-
send(options: EmailSendOptions): Promise<void>;
|
|
60
|
-
protected $provider(): EmailProvider;
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region src/errors/EmailError.d.ts
|
|
64
|
-
declare class EmailError extends Error {
|
|
65
|
-
constructor(message: string, cause?: Error);
|
|
66
|
-
}
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region src/providers/LocalEmailProvider.d.ts
|
|
69
|
-
interface LocalEmailProviderOptions {
|
|
70
|
-
/**
|
|
71
|
-
* Directory to save email files.
|
|
72
|
-
* @default "node_modules/.email" (relative to project root)
|
|
73
|
-
*/
|
|
74
|
-
directory?: string;
|
|
75
|
-
}
|
|
76
|
-
declare class LocalEmailProvider implements EmailProvider {
|
|
77
|
-
protected readonly log: _alepha_logger0.Logger;
|
|
78
|
-
protected readonly directory: string;
|
|
79
|
-
constructor(options?: LocalEmailProviderOptions);
|
|
80
|
-
send(options: EmailSendOptions): Promise<void>;
|
|
81
|
-
createEmailHtml(options: {
|
|
82
|
-
to: string;
|
|
83
|
-
subject: string;
|
|
84
|
-
body: string;
|
|
85
|
-
}): string;
|
|
86
|
-
escapeHtml(text: string): string;
|
|
87
|
-
}
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/providers/MemoryEmailProvider.d.ts
|
|
90
|
-
interface EmailRecord {
|
|
91
|
-
to: string;
|
|
92
|
-
subject: string;
|
|
93
|
-
body: string;
|
|
94
|
-
sentAt: Date;
|
|
95
|
-
}
|
|
96
|
-
declare class MemoryEmailProvider implements EmailProvider {
|
|
97
|
-
protected readonly log: _alepha_logger0.Logger;
|
|
98
|
-
records: EmailRecord[];
|
|
99
|
-
send(options: EmailSendOptions): Promise<void>;
|
|
100
|
-
/**
|
|
101
|
-
* Get the last email sent (for testing purposes).
|
|
102
|
-
*/
|
|
103
|
-
get last(): EmailRecord | undefined;
|
|
104
|
-
}
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region src/providers/NodemailerEmailProvider.d.ts
|
|
107
|
-
interface NodemailerEmailProviderOptions {
|
|
108
|
-
/**
|
|
109
|
-
* Custom transporter configuration.
|
|
110
|
-
* If provided, will override environment variables.
|
|
111
|
-
*/
|
|
112
|
-
transporter?: Transporter;
|
|
113
|
-
/**
|
|
114
|
-
* Custom from email address.
|
|
115
|
-
* If not provided, will use EMAIL_FROM from environment.
|
|
116
|
-
*/
|
|
117
|
-
from?: string;
|
|
118
|
-
/**
|
|
119
|
-
* Additional nodemailer options.
|
|
120
|
-
*/
|
|
121
|
-
options?: {
|
|
122
|
-
pool?: boolean;
|
|
123
|
-
maxConnections?: number;
|
|
124
|
-
maxMessages?: number;
|
|
125
|
-
rateDelta?: number;
|
|
126
|
-
rateLimit?: number;
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
declare class NodemailerEmailProvider implements EmailProvider {
|
|
130
|
-
protected readonly env: {
|
|
131
|
-
EMAIL_HOST: string;
|
|
132
|
-
EMAIL_PORT: number;
|
|
133
|
-
EMAIL_USER: string;
|
|
134
|
-
EMAIL_PASS: string;
|
|
135
|
-
EMAIL_FROM: string;
|
|
136
|
-
EMAIL_SECURE: boolean;
|
|
137
|
-
};
|
|
138
|
-
protected readonly log: _alepha_logger0.Logger;
|
|
139
|
-
protected transporter: Transporter;
|
|
140
|
-
protected fromAddress: string;
|
|
141
|
-
readonly options: NodemailerEmailProviderOptions;
|
|
142
|
-
constructor();
|
|
143
|
-
send(options: EmailSendOptions): Promise<void>;
|
|
144
|
-
protected createTransporter(): Transporter;
|
|
145
|
-
/**
|
|
146
|
-
* Verify the connection to the email server.
|
|
147
|
-
*/
|
|
148
|
-
verify(): Promise<boolean>;
|
|
149
|
-
/**
|
|
150
|
-
* Close the transporter connection.
|
|
151
|
-
*/
|
|
152
|
-
close(): void;
|
|
153
|
-
protected readonly onStart: _alepha_core1.HookDescriptor<"start">;
|
|
154
|
-
protected readonly onStop: _alepha_core1.HookDescriptor<"stop">;
|
|
155
|
-
}
|
|
156
|
-
//#endregion
|
|
157
|
-
//#region src/index.d.ts
|
|
158
|
-
declare module "alepha" {
|
|
159
|
-
interface Hooks {
|
|
160
|
-
"email:sending": {
|
|
161
|
-
to: string | string[];
|
|
162
|
-
template: string;
|
|
163
|
-
variables: Record<string, unknown>;
|
|
164
|
-
provider: EmailProvider;
|
|
165
|
-
abort(): void;
|
|
166
|
-
};
|
|
167
|
-
"email:sent": {
|
|
168
|
-
to: string | string[];
|
|
169
|
-
template: string;
|
|
170
|
-
provider: EmailProvider;
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Provides email sending capabilities for Alepha applications with multiple provider backends.
|
|
176
|
-
*
|
|
177
|
-
* The email module enables declarative email sending through the `$email` descriptor, allowing you to send
|
|
178
|
-
* emails through different providers: memory (for testing), local file system, or SMTP via Nodemailer.
|
|
179
|
-
* It supports HTML email content and automatic provider selection based on environment configuration.
|
|
180
|
-
*
|
|
181
|
-
* @see {@link EmailProvider}
|
|
182
|
-
* @module alepha.email
|
|
183
|
-
*/
|
|
184
|
-
declare const AlephaEmail: _alepha_core1.Service<_alepha_core1.Module>;
|
|
185
|
-
//#endregion
|
|
186
|
-
export { $email, AlephaEmail, EmailDescriptor, EmailDescriptorOptions, EmailError, EmailProvider, EmailRecord, EmailSendOptions, LocalEmailProvider, LocalEmailProviderOptions, MemoryEmailProvider, NodemailerEmailProvider, NodemailerEmailProviderOptions };
|
|
187
|
-
//# sourceMappingURL=index.d.ts.map
|
package/email.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@alepha/email'
|
package/fake.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var m = require('@alepha/fake');
|
|
3
|
-
Object.keys(m).forEach(function (k) {
|
|
4
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
5
|
-
enumerable: true,
|
|
6
|
-
get: function () { return m[k]; }
|
|
7
|
-
});
|
|
8
|
-
});
|