alepha 0.7.6 → 0.8.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/LICENSE +21 -21
- package/README.md +44 -44
- package/batch.cjs +8 -0
- package/batch.d.ts +114 -0
- package/batch.js +1 -0
- package/cache/redis.d.ts +15 -18
- package/cache.d.ts +115 -119
- package/command.cjs +8 -0
- package/command.d.ts +154 -0
- package/command.js +1 -0
- package/core.d.ts +800 -795
- package/datetime.d.ts +76 -76
- package/lock/redis.d.ts +12 -12
- package/lock.d.ts +70 -75
- package/package.json +102 -29
- package/postgres.d.ts +385 -278
- package/queue/redis.d.ts +15 -13
- package/queue.d.ts +16 -13
- package/react/auth.d.ts +16 -16
- package/react/head.cjs +8 -0
- package/react/head.d.ts +92 -0
- package/react/head.js +1 -0
- package/react.d.ts +90 -116
- package/redis.d.ts +20 -27
- package/retry.d.ts +74 -54
- package/scheduler.d.ts +14 -13
- package/security.d.ts +38 -41
- package/server/cache.d.ts +9 -7
- package/server/compress.cjs +8 -0
- package/server/compress.d.ts +26 -0
- package/server/compress.js +1 -0
- package/server/cookies.d.ts +71 -14
- package/server/cors.cjs +8 -0
- package/server/cors.d.ts +29 -0
- package/server/cors.js +1 -0
- package/server/health.cjs +8 -0
- package/server/health.d.ts +42 -0
- package/server/health.js +1 -0
- package/server/helmet.cjs +8 -0
- package/server/helmet.d.ts +72 -0
- package/server/helmet.js +1 -0
- package/server/links.cjs +8 -0
- package/server/links.d.ts +179 -0
- package/server/links.js +1 -0
- package/server/metrics.cjs +8 -0
- package/server/metrics.d.ts +37 -0
- package/server/metrics.js +1 -0
- package/server/multipart.cjs +8 -0
- package/server/multipart.d.ts +48 -0
- package/server/multipart.js +1 -0
- package/server/proxy.cjs +8 -0
- package/server/proxy.d.ts +41 -0
- package/server/proxy.js +1 -0
- package/server/static.d.ts +63 -51
- package/server/swagger.d.ts +50 -50
- package/server.d.ts +220 -437
- package/topic/redis.d.ts +24 -23
- package/topic.d.ts +9 -19
- package/vite.d.ts +8 -1
package/topic/redis.d.ts
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import { SubscribeCallback, TopicProvider, UnSubscribeFn } from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { RedisProvider, RedisSubscriberProvider } from "@alepha/redis";
|
|
1
|
+
import { SubscribeCallback, TopicProvider, UnSubscribeFn } from "alepha/topic";
|
|
2
|
+
import { Alepha, HookDescriptor, Logger, Module, Static, TObject, TString } from "alepha";
|
|
3
|
+
import { RedisProvider, RedisSubscriberProvider } from "alepha/redis";
|
|
5
4
|
|
|
6
5
|
//#region src/providers/RedisTopicProvider.d.ts
|
|
6
|
+
declare const envSchema: TObject<{
|
|
7
|
+
REDIS_TOPIC_PREFIX: TString;
|
|
8
|
+
}>;
|
|
7
9
|
declare class RedisTopicProvider implements TopicProvider {
|
|
8
|
-
protected readonly env:
|
|
9
|
-
REDIS_TOPIC_PREFIX: string;
|
|
10
|
-
};
|
|
10
|
+
protected readonly env: Static<typeof envSchema>;
|
|
11
11
|
protected readonly redisProvider: RedisProvider;
|
|
12
12
|
protected readonly redisSubscriberProvider: RedisSubscriberProvider;
|
|
13
|
-
protected readonly log:
|
|
14
|
-
protected readonly stop:
|
|
13
|
+
protected readonly log: Logger;
|
|
14
|
+
protected readonly stop: HookDescriptor<"stop">;
|
|
15
15
|
prefix(queue: string): string;
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* Publish a message to a topic.
|
|
18
|
+
*/
|
|
19
19
|
publish(topic: string, message: string): Promise<void>;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
* Subscribe to a topic.
|
|
22
|
+
*/
|
|
23
23
|
subscribe(name: string, callback: SubscribeCallback): Promise<UnSubscribeFn>;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* Unsubscribe from a topic.
|
|
26
|
+
*/
|
|
27
27
|
unsubscribe(name: string, callback?: SubscribeCallback): Promise<void>;
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/index.d.ts
|
|
31
|
+
// ---------------------------------------------------------------------------------------------------------------------
|
|
31
32
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
declare class AlephaTopicRedis {
|
|
33
|
+
* Alepha Topic Redis Module.
|
|
34
|
+
*
|
|
35
|
+
* Plugin for Alepha Topic that provides Redis pub/sub capabilities.
|
|
36
|
+
*
|
|
37
|
+
* @see {@link RedisTopicProvider}
|
|
38
|
+
* @module alepha.topic.redis
|
|
39
|
+
*/
|
|
40
|
+
declare class AlephaTopicRedis implements Module {
|
|
40
41
|
readonly name = "alepha.topic.redis";
|
|
41
42
|
readonly $services: (alepha: Alepha) => Alepha;
|
|
42
43
|
}
|
package/topic.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as _alepha_core0 from "
|
|
2
|
-
import { Alepha, KIND, Module, OPTIONS, Static, TSchema } from "
|
|
3
|
-
import { DateTimeProvider, DurationLike } from "
|
|
1
|
+
import * as _alepha_core0 from "alepha";
|
|
2
|
+
import { Alepha, KIND, Module, OPTIONS, Static, TSchema } from "alepha";
|
|
3
|
+
import { DateTimeProvider, DurationLike } from "alepha/datetime";
|
|
4
4
|
|
|
5
5
|
//#region src/providers/TopicProvider.d.ts
|
|
6
6
|
declare class TopicProvider {
|
|
@@ -28,6 +28,7 @@ declare class TopicProvider {
|
|
|
28
28
|
}
|
|
29
29
|
type SubscribeCallback = (message: string) => Promise<void> | void;
|
|
30
30
|
type UnSubscribeFn = () => Promise<void>;
|
|
31
|
+
//# sourceMappingURL=TopicProvider.d.ts.map
|
|
31
32
|
//#endregion
|
|
32
33
|
//#region src/descriptors/$topic.d.ts
|
|
33
34
|
declare const KEY$1 = "TOPIC";
|
|
@@ -69,31 +70,15 @@ declare const $topic: {
|
|
|
69
70
|
//#endregion
|
|
70
71
|
//#region src/descriptors/$subscriber.d.ts
|
|
71
72
|
declare const KEY = "SUBSCRIBER";
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
*/
|
|
75
73
|
interface SubscriberDescriptorOptions<T extends TopicMessageSchema = TopicMessageSchema> {
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
*/
|
|
79
74
|
topic: TopicDescriptor<T>;
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* @param message
|
|
83
|
-
*/
|
|
84
75
|
handler: (message: {
|
|
85
76
|
payload: Static<T["payload"]>;
|
|
86
77
|
}) => Promise<void>;
|
|
87
78
|
}
|
|
88
|
-
/**
|
|
89
|
-
*
|
|
90
|
-
*/
|
|
91
79
|
interface SubscriberDescriptor<T extends TopicMessageSchema = TopicMessageSchema> {
|
|
92
80
|
[KIND]: typeof KEY;
|
|
93
81
|
[OPTIONS]: SubscriberDescriptorOptions<T>;
|
|
94
|
-
/**
|
|
95
|
-
*
|
|
96
|
-
*/
|
|
97
82
|
topic: () => TopicDescriptor<T>;
|
|
98
83
|
}
|
|
99
84
|
/**
|
|
@@ -113,6 +98,7 @@ declare class TopicTimeoutError extends Error {
|
|
|
113
98
|
readonly timeout: number;
|
|
114
99
|
constructor(topic: string, timeout: number);
|
|
115
100
|
}
|
|
101
|
+
//# sourceMappingURL=TopicTimeoutError.d.ts.map
|
|
116
102
|
//#endregion
|
|
117
103
|
//#region src/providers/MemoryTopicProvider.d.ts
|
|
118
104
|
declare class MemoryTopicProvider implements TopicProvider {
|
|
@@ -138,6 +124,7 @@ declare class MemoryTopicProvider implements TopicProvider {
|
|
|
138
124
|
*/
|
|
139
125
|
unsubscribe(topic: string): Promise<void>;
|
|
140
126
|
}
|
|
127
|
+
//# sourceMappingURL=MemoryTopicProvider.d.ts.map
|
|
141
128
|
//#endregion
|
|
142
129
|
//#region src/providers/TopicDescriptorProvider.d.ts
|
|
143
130
|
declare class TopicDescriptorProvider {
|
|
@@ -205,6 +192,7 @@ declare class TopicDescriptorProvider {
|
|
|
205
192
|
payload: any;
|
|
206
193
|
};
|
|
207
194
|
}
|
|
195
|
+
//# sourceMappingURL=TopicDescriptorProvider.d.ts.map
|
|
208
196
|
//#endregion
|
|
209
197
|
//#region src/index.d.ts
|
|
210
198
|
/**
|
|
@@ -222,6 +210,8 @@ declare class AlephaTopic implements Module {
|
|
|
222
210
|
readonly name = "alepha.topic";
|
|
223
211
|
readonly $services: (alepha: Alepha) => Alepha;
|
|
224
212
|
}
|
|
213
|
+
//# sourceMappingURL=index.d.ts.map
|
|
214
|
+
|
|
225
215
|
//#endregion
|
|
226
216
|
export { $subscriber, $topic, AlephaTopic, MemoryTopicProvider, SubscribeCallback, SubscriberDescriptor, SubscriberDescriptorOptions, TopicDescriptor, TopicDescriptorOptions, TopicDescriptorProvider, TopicMessage, TopicMessageSchema, TopicProvider, TopicTimeoutError, TopicWaitOptions, UnSubscribeFn };
|
|
227
217
|
//# sourceMappingURL=index.d.ts.map
|
package/vite.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BrotliOptions, ZlibOptions } from "node:zlib";
|
|
2
|
-
import { Alepha } from "
|
|
2
|
+
import { Alepha } from "alepha";
|
|
3
3
|
import { Plugin } from "vite";
|
|
4
4
|
|
|
5
5
|
//#region src/viteAlephaBuild.d.ts
|
|
@@ -24,6 +24,7 @@ interface ViteAlephaBuildOptions {
|
|
|
24
24
|
vercel?: boolean;
|
|
25
25
|
}
|
|
26
26
|
declare function viteAlephaBuild(options?: ViteAlephaBuildOptions): Promise<Plugin>;
|
|
27
|
+
//# sourceMappingURL=viteAlephaBuild.d.ts.map
|
|
27
28
|
//#endregion
|
|
28
29
|
//#region src/viteAlephaDev.d.ts
|
|
29
30
|
interface ViteAlephaDevOptions {
|
|
@@ -43,10 +44,12 @@ interface ViteAlephaDevOptions {
|
|
|
43
44
|
* Plug Alepha into Vite development server.
|
|
44
45
|
*/
|
|
45
46
|
declare function viteAlephaDev(options?: ViteAlephaDevOptions): Promise<Plugin>;
|
|
47
|
+
//# sourceMappingURL=viteAlephaDev.d.ts.map
|
|
46
48
|
//#endregion
|
|
47
49
|
//#region src/viteAlepha.d.ts
|
|
48
50
|
type ViteAlephaOptions = ViteAlephaDevOptions & ViteAlephaBuildOptions;
|
|
49
51
|
declare function viteAlepha(options?: ViteAlephaOptions): (Plugin | Promise<Plugin>)[];
|
|
52
|
+
//# sourceMappingURL=viteAlepha.d.ts.map
|
|
50
53
|
//#endregion
|
|
51
54
|
//#region src/viteAlephaBuildVercel.d.ts
|
|
52
55
|
interface ViteAlephaBuildVercelOptions {
|
|
@@ -68,6 +71,7 @@ declare function viteAlephaBuildVercel(opts?: ViteAlephaBuildVercelOptions): Pro
|
|
|
68
71
|
apply: string;
|
|
69
72
|
writeBundle(): void;
|
|
70
73
|
}>;
|
|
74
|
+
//# sourceMappingURL=viteAlephaBuildVercel.d.ts.map
|
|
71
75
|
//#endregion
|
|
72
76
|
//#region src/viteCompress.d.ts
|
|
73
77
|
interface ViteCompressOptions {
|
|
@@ -100,11 +104,14 @@ interface ViteCompressOptions {
|
|
|
100
104
|
filter?: RegExp | ((fileName: string) => boolean);
|
|
101
105
|
}
|
|
102
106
|
declare function viteCompress(options?: ViteCompressOptions): Plugin;
|
|
107
|
+
//# sourceMappingURL=viteCompress.d.ts.map
|
|
103
108
|
//#endregion
|
|
104
109
|
//#region src/index.d.ts
|
|
105
110
|
declare global {
|
|
106
111
|
var __alepha: Alepha;
|
|
107
112
|
}
|
|
113
|
+
//# sourceMappingURL=index.d.ts.map
|
|
114
|
+
|
|
108
115
|
//#endregion
|
|
109
116
|
export { ViteAlephaBuildOptions, ViteAlephaBuildVercelOptions, ViteAlephaDevOptions, ViteAlephaOptions, ViteCompressOptions, viteAlepha, viteAlephaBuild, viteAlephaBuildVercel, viteAlephaDev, viteCompress };
|
|
110
117
|
//# sourceMappingURL=index.d.ts.map
|