alepha 0.7.7 → 0.8.1
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 +7 -34
- package/batch.cjs +8 -0
- package/batch.d.ts +147 -0
- package/batch.js +1 -0
- package/cache/redis.d.ts +13 -18
- package/cache.d.ts +183 -119
- package/command.cjs +8 -0
- package/command.d.ts +152 -0
- package/command.js +1 -0
- package/core.d.ts +846 -838
- package/datetime.d.ts +78 -78
- package/file.cjs +8 -0
- package/file.d.ts +46 -0
- package/file.js +1 -0
- package/lock/redis.d.ts +10 -12
- package/lock.d.ts +73 -80
- package/package.json +86 -34
- package/postgres.d.ts +348 -170
- package/queue/redis.d.ts +13 -13
- package/queue.d.ts +107 -18
- package/react/auth.d.ts +22 -16
- package/react/head.d.ts +10 -4
- package/react.d.ts +206 -49
- package/redis.d.ts +23 -27
- package/retry.d.ts +75 -54
- package/router.cjs +8 -0
- package/router.d.ts +45 -0
- package/router.js +1 -0
- package/scheduler.d.ts +15 -16
- package/security.d.ts +229 -40
- package/server/cache.d.ts +7 -8
- package/server/compress.cjs +8 -0
- package/server/compress.d.ts +26 -0
- package/server/compress.js +1 -0
- package/server/cookies.d.ts +249 -18
- package/server/cors.d.ts +7 -3
- package/server/health.d.ts +21 -24
- package/server/helmet.cjs +8 -0
- package/server/helmet.d.ts +70 -0
- package/server/helmet.js +1 -0
- package/server/links.d.ts +87 -93
- package/server/metrics.cjs +8 -0
- package/server/metrics.d.ts +35 -0
- package/server/metrics.js +1 -0
- package/server/multipart.cjs +8 -0
- package/server/multipart.d.ts +46 -0
- package/server/multipart.js +1 -0
- package/server/proxy.d.ts +11 -11
- package/server/static.d.ts +70 -55
- package/server/swagger.d.ts +55 -54
- package/server.d.ts +273 -123
- package/topic/redis.d.ts +22 -23
- package/topic.d.ts +26 -19
- package/vite.d.ts +59 -36
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,9 +28,17 @@ 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";
|
|
35
|
+
/**
|
|
36
|
+
* Create a new topic.
|
|
37
|
+
*/
|
|
38
|
+
declare const $topic: {
|
|
39
|
+
<T extends TopicMessageSchema>(options: TopicDescriptorOptions<T>): TopicDescriptor<T>;
|
|
40
|
+
[KIND]: string;
|
|
41
|
+
};
|
|
34
42
|
interface TopicMessageSchema {
|
|
35
43
|
headers?: TSchema;
|
|
36
44
|
payload: TSchema;
|
|
@@ -62,13 +70,19 @@ interface TopicWaitOptions<T extends TopicMessageSchema> {
|
|
|
62
70
|
payload: Static<T["payload"]>;
|
|
63
71
|
}) => boolean;
|
|
64
72
|
}
|
|
65
|
-
declare const $topic: {
|
|
66
|
-
<T extends TopicMessageSchema>(options: TopicDescriptorOptions<T>): TopicDescriptor<T>;
|
|
67
|
-
[KIND]: string;
|
|
68
|
-
};
|
|
69
73
|
//#endregion
|
|
70
74
|
//#region src/descriptors/$subscriber.d.ts
|
|
71
75
|
declare const KEY = "SUBSCRIBER";
|
|
76
|
+
/**
|
|
77
|
+
* Subscriber descriptor.
|
|
78
|
+
*
|
|
79
|
+
* @param options - The subscriber options.
|
|
80
|
+
* @returns The descriptor value.
|
|
81
|
+
*/
|
|
82
|
+
declare const $subscriber: {
|
|
83
|
+
<T extends TopicMessageSchema>(options: SubscriberDescriptorOptions<T>): SubscriberDescriptor<T>;
|
|
84
|
+
[KIND]: string;
|
|
85
|
+
};
|
|
72
86
|
interface SubscriberDescriptorOptions<T extends TopicMessageSchema = TopicMessageSchema> {
|
|
73
87
|
topic: TopicDescriptor<T>;
|
|
74
88
|
handler: (message: {
|
|
@@ -80,16 +94,6 @@ interface SubscriberDescriptor<T extends TopicMessageSchema = TopicMessageSchema
|
|
|
80
94
|
[OPTIONS]: SubscriberDescriptorOptions<T>;
|
|
81
95
|
topic: () => TopicDescriptor<T>;
|
|
82
96
|
}
|
|
83
|
-
/**
|
|
84
|
-
* Subscriber descriptor.
|
|
85
|
-
*
|
|
86
|
-
* @param options - The subscriber options.
|
|
87
|
-
* @returns The descriptor value.
|
|
88
|
-
*/
|
|
89
|
-
declare const $subscriber: {
|
|
90
|
-
<T extends TopicMessageSchema>(options: SubscriberDescriptorOptions<T>): SubscriberDescriptor<T>;
|
|
91
|
-
[KIND]: string;
|
|
92
|
-
};
|
|
93
97
|
//#endregion
|
|
94
98
|
//#region src/errors/TopicTimeoutError.d.ts
|
|
95
99
|
declare class TopicTimeoutError extends Error {
|
|
@@ -97,6 +101,7 @@ declare class TopicTimeoutError extends Error {
|
|
|
97
101
|
readonly timeout: number;
|
|
98
102
|
constructor(topic: string, timeout: number);
|
|
99
103
|
}
|
|
104
|
+
//# sourceMappingURL=TopicTimeoutError.d.ts.map
|
|
100
105
|
//#endregion
|
|
101
106
|
//#region src/providers/MemoryTopicProvider.d.ts
|
|
102
107
|
declare class MemoryTopicProvider implements TopicProvider {
|
|
@@ -122,6 +127,7 @@ declare class MemoryTopicProvider implements TopicProvider {
|
|
|
122
127
|
*/
|
|
123
128
|
unsubscribe(topic: string): Promise<void>;
|
|
124
129
|
}
|
|
130
|
+
//# sourceMappingURL=MemoryTopicProvider.d.ts.map
|
|
125
131
|
//#endregion
|
|
126
132
|
//#region src/providers/TopicDescriptorProvider.d.ts
|
|
127
133
|
declare class TopicDescriptorProvider {
|
|
@@ -189,11 +195,10 @@ declare class TopicDescriptorProvider {
|
|
|
189
195
|
payload: any;
|
|
190
196
|
};
|
|
191
197
|
}
|
|
198
|
+
//# sourceMappingURL=TopicDescriptorProvider.d.ts.map
|
|
192
199
|
//#endregion
|
|
193
200
|
//#region src/index.d.ts
|
|
194
201
|
/**
|
|
195
|
-
* Alepha Topic Module
|
|
196
|
-
*
|
|
197
202
|
* Generic interface for pub/sub messaging.
|
|
198
203
|
* Gives you the ability to create topics and subscribers.
|
|
199
204
|
* This module provides only a memory implementation of the topic provider.
|
|
@@ -206,6 +211,8 @@ declare class AlephaTopic implements Module {
|
|
|
206
211
|
readonly name = "alepha.topic";
|
|
207
212
|
readonly $services: (alepha: Alepha) => Alepha;
|
|
208
213
|
}
|
|
214
|
+
//# sourceMappingURL=index.d.ts.map
|
|
215
|
+
|
|
209
216
|
//#endregion
|
|
210
217
|
export { $subscriber, $topic, AlephaTopic, MemoryTopicProvider, SubscribeCallback, SubscriberDescriptor, SubscriberDescriptorOptions, TopicDescriptor, TopicDescriptorOptions, TopicDescriptorProvider, TopicMessage, TopicMessageSchema, TopicProvider, TopicTimeoutError, TopicWaitOptions, UnSubscribeFn };
|
|
211
218
|
//# sourceMappingURL=index.d.ts.map
|
package/vite.d.ts
CHANGED
|
@@ -1,7 +1,56 @@
|
|
|
1
1
|
import { BrotliOptions, ZlibOptions } from "node:zlib";
|
|
2
|
-
import { Alepha } from "
|
|
3
|
-
import { Plugin } from "vite";
|
|
2
|
+
import { Alepha } from "alepha";
|
|
3
|
+
import { Plugin, UserConfig } from "vite";
|
|
4
4
|
|
|
5
|
+
//#region src/viteCompress.d.ts
|
|
6
|
+
interface ViteCompressOptions {
|
|
7
|
+
/**
|
|
8
|
+
* If true, the plugin will not compress the files.
|
|
9
|
+
*
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* If true, the plugin will compress the files using brotli.
|
|
15
|
+
* Can also be an object with brotli options.
|
|
16
|
+
*
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
brotli?: boolean | BrotliOptions;
|
|
20
|
+
/**
|
|
21
|
+
* If true, the plugin will compress the files using gzip.
|
|
22
|
+
* Can also be an object with gzip options.
|
|
23
|
+
*
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
gzip?: boolean | ZlibOptions;
|
|
27
|
+
/**
|
|
28
|
+
* A filter to determine which files to compress.
|
|
29
|
+
* Can be a RegExp or a function that returns true for files to compress.
|
|
30
|
+
*
|
|
31
|
+
* @default /\.(js|mjs|cjs|css|wasm|svg|html)$/
|
|
32
|
+
*/
|
|
33
|
+
filter?: RegExp | ((fileName: string) => boolean);
|
|
34
|
+
}
|
|
35
|
+
declare function viteCompress(options?: ViteCompressOptions): Plugin;
|
|
36
|
+
declare function compressFile(options: ViteCompressOptions | undefined, filePath: string): Promise<void>;
|
|
37
|
+
//# sourceMappingURL=viteCompress.d.ts.map
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/helpers/buildClient.d.ts
|
|
40
|
+
interface BuildClientOptions {
|
|
41
|
+
dist: string;
|
|
42
|
+
html: string;
|
|
43
|
+
/**
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
precompress?: ViteCompressOptions | boolean;
|
|
47
|
+
/**
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
prerender?: boolean;
|
|
51
|
+
config?: UserConfig;
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
5
54
|
//#region src/viteAlephaBuild.d.ts
|
|
6
55
|
interface ViteAlephaBuildOptions {
|
|
7
56
|
/**
|
|
@@ -13,7 +62,7 @@ interface ViteAlephaBuildOptions {
|
|
|
13
62
|
* Set false to skip the client build.
|
|
14
63
|
* This is useful if you only want to build the server-side application.
|
|
15
64
|
*/
|
|
16
|
-
client?: false
|
|
65
|
+
client?: false | Partial<BuildClientOptions>;
|
|
17
66
|
/**
|
|
18
67
|
* If true, the build will be optimized for Vercel deployment.
|
|
19
68
|
*
|
|
@@ -24,6 +73,7 @@ interface ViteAlephaBuildOptions {
|
|
|
24
73
|
vercel?: boolean;
|
|
25
74
|
}
|
|
26
75
|
declare function viteAlephaBuild(options?: ViteAlephaBuildOptions): Promise<Plugin>;
|
|
76
|
+
//# sourceMappingURL=viteAlephaBuild.d.ts.map
|
|
27
77
|
//#endregion
|
|
28
78
|
//#region src/viteAlephaDev.d.ts
|
|
29
79
|
interface ViteAlephaDevOptions {
|
|
@@ -43,10 +93,12 @@ interface ViteAlephaDevOptions {
|
|
|
43
93
|
* Plug Alepha into Vite development server.
|
|
44
94
|
*/
|
|
45
95
|
declare function viteAlephaDev(options?: ViteAlephaDevOptions): Promise<Plugin>;
|
|
96
|
+
//# sourceMappingURL=viteAlephaDev.d.ts.map
|
|
46
97
|
//#endregion
|
|
47
98
|
//#region src/viteAlepha.d.ts
|
|
48
99
|
type ViteAlephaOptions = ViteAlephaDevOptions & ViteAlephaBuildOptions;
|
|
49
100
|
declare function viteAlepha(options?: ViteAlephaOptions): (Plugin | Promise<Plugin>)[];
|
|
101
|
+
//# sourceMappingURL=viteAlepha.d.ts.map
|
|
50
102
|
//#endregion
|
|
51
103
|
//#region src/viteAlephaBuildVercel.d.ts
|
|
52
104
|
interface ViteAlephaBuildVercelOptions {
|
|
@@ -68,43 +120,14 @@ declare function viteAlephaBuildVercel(opts?: ViteAlephaBuildVercelOptions): Pro
|
|
|
68
120
|
apply: string;
|
|
69
121
|
writeBundle(): void;
|
|
70
122
|
}>;
|
|
71
|
-
//#
|
|
72
|
-
//#region src/viteCompress.d.ts
|
|
73
|
-
interface ViteCompressOptions {
|
|
74
|
-
/**
|
|
75
|
-
* If true, the plugin will not compress the files.
|
|
76
|
-
*
|
|
77
|
-
* @default false
|
|
78
|
-
*/
|
|
79
|
-
disabled?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* If true, the plugin will compress the files using brotli.
|
|
82
|
-
* Can also be an object with brotli options.
|
|
83
|
-
*
|
|
84
|
-
* @default true
|
|
85
|
-
*/
|
|
86
|
-
brotli?: boolean | BrotliOptions;
|
|
87
|
-
/**
|
|
88
|
-
* If true, the plugin will compress the files using gzip.
|
|
89
|
-
* Can also be an object with gzip options.
|
|
90
|
-
*
|
|
91
|
-
* @default true
|
|
92
|
-
*/
|
|
93
|
-
gzip?: boolean | ZlibOptions;
|
|
94
|
-
/**
|
|
95
|
-
* A filter to determine which files to compress.
|
|
96
|
-
* Can be a RegExp or a function that returns true for files to compress.
|
|
97
|
-
*
|
|
98
|
-
* @default /\.(js|mjs|cjs|css|wasm|svg)$/
|
|
99
|
-
*/
|
|
100
|
-
filter?: RegExp | ((fileName: string) => boolean);
|
|
101
|
-
}
|
|
102
|
-
declare function viteCompress(options?: ViteCompressOptions): Plugin;
|
|
123
|
+
//# sourceMappingURL=viteAlephaBuildVercel.d.ts.map
|
|
103
124
|
//#endregion
|
|
104
125
|
//#region src/index.d.ts
|
|
105
126
|
declare global {
|
|
106
127
|
var __alepha: Alepha;
|
|
107
128
|
}
|
|
129
|
+
//# sourceMappingURL=index.d.ts.map
|
|
130
|
+
|
|
108
131
|
//#endregion
|
|
109
|
-
export { ViteAlephaBuildOptions, ViteAlephaBuildVercelOptions, ViteAlephaDevOptions, ViteAlephaOptions, ViteCompressOptions, viteAlepha, viteAlephaBuild, viteAlephaBuildVercel, viteAlephaDev, viteCompress };
|
|
132
|
+
export { ViteAlephaBuildOptions, ViteAlephaBuildVercelOptions, ViteAlephaDevOptions, ViteAlephaOptions, ViteCompressOptions, compressFile, viteAlepha, viteAlephaBuild, viteAlephaBuildVercel, viteAlephaDev, viteCompress };
|
|
110
133
|
//# sourceMappingURL=index.d.ts.map
|