alepha 0.7.4 → 0.7.6
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 -21
- package/cache/redis.cjs +4 -8
- package/cache/redis.d.ts +30 -91
- package/cache/redis.js +1 -1
- package/cache.cjs +4 -8
- package/cache.d.ts +190 -259
- package/cache.js +1 -1
- package/core.cjs +4 -8
- package/core.d.ts +950 -925
- package/core.js +1 -1
- package/datetime.cjs +4 -8
- package/datetime.d.ts +151 -140
- package/datetime.js +1 -1
- package/lock/redis.cjs +7 -49
- package/lock/redis.d.ts +17 -14
- package/lock/redis.js +1 -47
- package/lock.cjs +4 -8
- package/lock.d.ts +117 -170
- package/lock.js +1 -1
- package/package.json +70 -40
- package/postgres.cjs +4 -8
- package/postgres.d.ts +1314 -4400
- package/postgres.js +1 -1
- package/queue/redis.cjs +8 -0
- package/queue/redis.d.ts +31 -0
- package/queue/redis.js +1 -0
- package/queue.cjs +4 -8
- package/queue.d.ts +162 -205
- package/queue.js +1 -1
- package/react/auth.cjs +4 -8
- package/react/auth.d.ts +167 -280
- package/react/auth.js +1 -1
- package/react.cjs +4 -8
- package/react.d.ts +530 -570
- package/react.js +1 -1
- package/redis.cjs +4 -8
- package/redis.d.ts +59 -132
- package/redis.js +1 -1
- package/retry.cjs +4 -8
- package/retry.d.ts +34 -31
- package/retry.js +1 -1
- package/scheduler.cjs +4 -8
- package/scheduler.d.ts +128 -155
- package/scheduler.js +1 -1
- package/security.cjs +4 -8
- package/security.d.ts +472 -595
- package/security.js +1 -1
- package/server/cache.cjs +4 -8
- package/server/cache.d.ts +73 -39
- package/server/cache.js +1 -1
- package/server/cookies.cjs +4 -8
- package/server/cookies.d.ts +46 -41
- package/server/cookies.js +1 -1
- package/server/static.cjs +4 -8
- package/server/static.d.ts +98 -95
- package/server/static.js +1 -1
- package/server/swagger.cjs +4 -8
- package/server/swagger.d.ts +106 -92
- package/server/swagger.js +1 -1
- package/server.cjs +4 -8
- package/server.d.ts +754 -1025
- package/server.js +1 -1
- package/testing.cjs +8 -0
- package/testing.d.ts +1 -0
- package/testing.js +1 -0
- package/topic/redis.cjs +8 -0
- package/topic/redis.d.ts +45 -0
- package/topic/redis.js +1 -0
- package/topic.cjs +4 -8
- package/topic.d.ts +171 -163
- package/topic.js +1 -1
- package/vite.cjs +4 -8
- package/vite.d.ts +91 -84
- package/vite.js +1 -1
- package/assets/logo.png +0 -0
- package/src/cache/redis.ts +0 -1
- package/src/cache.ts +0 -1
- package/src/core.ts +0 -1
- package/src/datetime.ts +0 -1
- package/src/lock/redis.ts +0 -1
- package/src/lock.ts +0 -1
- package/src/postgres.ts +0 -1
- package/src/queue/redis.ts +0 -1
- package/src/queue.ts +0 -1
- package/src/react/auth.ts +0 -1
- package/src/react.ts +0 -1
- package/src/redis.ts +0 -1
- package/src/retry.ts +0 -1
- package/src/scheduler.ts +0 -1
- package/src/security.ts +0 -1
- package/src/server/cache.ts +0 -1
- package/src/server/cookies.ts +0 -1
- package/src/server/static.ts +0 -1
- package/src/server/swagger.ts +0 -1
- package/src/server.ts +0 -1
- package/src/topic/redis.ts +0 -1
- package/src/topic.ts +0 -1
- package/src/vite.ts +0 -1
package/cache.d.ts
CHANGED
|
@@ -1,286 +1,216 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import * as _alepha_core0 from "@alepha/core";
|
|
2
|
+
import * as _alepha_core5 from "@alepha/core";
|
|
3
|
+
import { Alepha, KIND, Module, OPTIONS, Static } from "@alepha/core";
|
|
4
|
+
import { DateTimeProvider, DurationLike, Timeout } from "@alepha/datetime";
|
|
5
|
+
import * as _sinclair_typebox1 from "@sinclair/typebox";
|
|
4
6
|
|
|
7
|
+
//#region src/providers/CacheProvider.d.ts
|
|
5
8
|
/**
|
|
6
9
|
* Cache provider interface.
|
|
7
10
|
*
|
|
8
11
|
* All methods are asynchronous and return promises.
|
|
9
|
-
* Values are stored as
|
|
12
|
+
* Values are stored as Uint8Array.
|
|
10
13
|
*/
|
|
11
14
|
declare abstract class CacheProvider {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Get the value of a key.
|
|
17
|
+
*
|
|
18
|
+
* @param name Cache name, used to group keys. Should be Redis-like "some:group:name" format.
|
|
19
|
+
* @param key The key of the value to get.
|
|
20
|
+
*
|
|
21
|
+
* @return The value of the key, or undefined if the key does not exist.
|
|
22
|
+
*/
|
|
23
|
+
abstract get(name: string, key: string): Promise<Uint8Array | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Set the string value of a key.
|
|
26
|
+
*
|
|
27
|
+
* @param name Cache name, used to group keys. Should be Redis-like "some:group:name" format.
|
|
28
|
+
* @param key The key of the value to set.
|
|
29
|
+
* @param value The value to set.
|
|
30
|
+
* @param ttl The time-to-live of the key, in milliseconds.
|
|
31
|
+
*
|
|
32
|
+
* @return The value of the key.
|
|
33
|
+
*/
|
|
34
|
+
abstract set(name: string, key: string, value: Uint8Array, ttl?: number): Promise<Uint8Array>;
|
|
35
|
+
/**
|
|
36
|
+
* Remove the specified keys.
|
|
37
|
+
*
|
|
38
|
+
* @param name Cache name, used to group keys. Should be Redis-like "some:group:name" format.
|
|
39
|
+
* @param keys The keys to delete.
|
|
40
|
+
*/
|
|
41
|
+
abstract del(name: string, ...keys: string[]): Promise<void>;
|
|
42
|
+
abstract has(name: string, key: string): Promise<boolean>;
|
|
43
|
+
abstract keys(name: string): Promise<string[]>;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/descriptors/$cache.d.ts
|
|
43
47
|
declare const KEY = "CACHE";
|
|
44
48
|
/**
|
|
45
49
|
* Cache Descriptor
|
|
46
50
|
*/
|
|
47
51
|
declare const $cache: {
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
<TReturn = string, TParameter extends any[] = any[]>(options?: CacheDescriptorOptions<TReturn, TParameter>): CacheDescriptor<TReturn, TParameter>;
|
|
53
|
+
[KIND]: string;
|
|
50
54
|
};
|
|
51
55
|
interface CacheDescriptorOptions<TReturn, TParameter extends any[] = any[]> {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
56
|
+
/**
|
|
57
|
+
* The cache name. This is useful for invalidating multiple caches at once.
|
|
58
|
+
*
|
|
59
|
+
* Store key as `cache:$name:$key`.
|
|
60
|
+
*
|
|
61
|
+
* @default ClassName:methodName
|
|
62
|
+
*/
|
|
63
|
+
name?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Function which returns cached data.
|
|
66
|
+
* @param args Arguments for handler.
|
|
67
|
+
*/
|
|
68
|
+
handler?: (...args: TParameter) => TReturn;
|
|
69
|
+
/**
|
|
70
|
+
* The key generator for the cache.
|
|
71
|
+
* If not provided, the arguments will be json.stringify().
|
|
72
|
+
*/
|
|
73
|
+
key?: (...args: TParameter) => string;
|
|
74
|
+
/**
|
|
75
|
+
* The store provider for the cache.
|
|
76
|
+
* If not provided, the default store provider will be used.
|
|
77
|
+
*/
|
|
78
|
+
provider?: CacheProvider | (() => CacheProvider) | "memory";
|
|
79
|
+
/**
|
|
80
|
+
* The time-to-live for the cache in seconds.
|
|
81
|
+
* Set 0 to skip expiration.
|
|
82
|
+
*
|
|
83
|
+
* @default 300 (5 minutes).
|
|
84
|
+
*/
|
|
85
|
+
ttl?: DurationLike;
|
|
86
|
+
/**
|
|
87
|
+
* If the cache is disabled.
|
|
88
|
+
*/
|
|
89
|
+
disabled?: boolean;
|
|
86
90
|
}
|
|
87
91
|
interface CacheDescriptor<TReturn = any, TParameter extends any[] = any[]> {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
declare const ReadonlyKind: unique symbol;
|
|
120
|
-
/** Symbol key applied to optional types */
|
|
121
|
-
declare const OptionalKind: unique symbol;
|
|
122
|
-
/** Symbol key applied to types */
|
|
123
|
-
declare const Hint: unique symbol;
|
|
124
|
-
/** Symbol key applied to types */
|
|
125
|
-
declare const Kind: unique symbol;
|
|
126
|
-
|
|
127
|
-
type StringFormatOption = 'date-time' | 'time' | 'date' | 'email' | 'idn-email' | 'hostname' | 'idn-hostname' | 'ipv4' | 'ipv6' | 'uri' | 'uri-reference' | 'iri' | 'uuid' | 'iri-reference' | 'uri-template' | 'json-pointer' | 'relative-json-pointer' | 'regex' | ({} & string);
|
|
128
|
-
type StringContentEncodingOption = '7bit' | '8bit' | 'binary' | 'quoted-printable' | 'base64' | ({} & string);
|
|
129
|
-
interface StringOptions extends SchemaOptions {
|
|
130
|
-
/** The maximum string length */
|
|
131
|
-
maxLength?: number;
|
|
132
|
-
/** The minimum string length */
|
|
133
|
-
minLength?: number;
|
|
134
|
-
/** A regular expression pattern this string should match */
|
|
135
|
-
pattern?: string;
|
|
136
|
-
/** A format this string should match */
|
|
137
|
-
format?: StringFormatOption;
|
|
138
|
-
/** The content encoding for this string */
|
|
139
|
-
contentEncoding?: StringContentEncodingOption;
|
|
140
|
-
/** The content media type for this string */
|
|
141
|
-
contentMediaType?: string;
|
|
142
|
-
}
|
|
143
|
-
interface TString extends TSchema, StringOptions {
|
|
144
|
-
[Kind]: 'String';
|
|
145
|
-
static: string;
|
|
146
|
-
type: 'string';
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
interface TBoolean extends TSchema {
|
|
150
|
-
[Kind]: 'Boolean';
|
|
151
|
-
static: boolean;
|
|
152
|
-
type: 'boolean';
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
interface NumberOptions extends SchemaOptions {
|
|
156
|
-
exclusiveMaximum?: number;
|
|
157
|
-
exclusiveMinimum?: number;
|
|
158
|
-
maximum?: number;
|
|
159
|
-
minimum?: number;
|
|
160
|
-
multipleOf?: number;
|
|
161
|
-
}
|
|
162
|
-
interface TNumber extends TSchema, NumberOptions {
|
|
163
|
-
[Kind]: 'Number';
|
|
164
|
-
static: number;
|
|
165
|
-
type: 'number';
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
type TOptional<T extends TSchema> = T & {
|
|
169
|
-
[OptionalKind]: 'Optional';
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
interface SchemaOptions {
|
|
173
|
-
$schema?: string;
|
|
174
|
-
/** Id for this schema */
|
|
175
|
-
$id?: string;
|
|
176
|
-
/** Title of this schema */
|
|
177
|
-
title?: string;
|
|
178
|
-
/** Description of this schema */
|
|
179
|
-
description?: string;
|
|
180
|
-
/** Default value for this schema */
|
|
181
|
-
default?: any;
|
|
182
|
-
/** Example values matching this schema */
|
|
183
|
-
examples?: any;
|
|
184
|
-
/** Optional annotation for readOnly */
|
|
185
|
-
readOnly?: boolean;
|
|
186
|
-
/** Optional annotation for writeOnly */
|
|
187
|
-
writeOnly?: boolean;
|
|
188
|
-
[prop: string]: any;
|
|
189
|
-
}
|
|
190
|
-
interface TKind {
|
|
191
|
-
[Kind]: string;
|
|
192
|
-
}
|
|
193
|
-
interface TSchema extends TKind, SchemaOptions {
|
|
194
|
-
[ReadonlyKind]?: string;
|
|
195
|
-
[OptionalKind]?: string;
|
|
196
|
-
[Hint]?: string;
|
|
197
|
-
params: unknown[];
|
|
198
|
-
static: unknown;
|
|
199
|
-
}
|
|
200
|
-
|
|
92
|
+
[KIND]: typeof KEY;
|
|
93
|
+
[OPTIONS]: CacheDescriptorOptions<TReturn, TParameter>;
|
|
94
|
+
/**
|
|
95
|
+
* Cache handler.
|
|
96
|
+
*/
|
|
97
|
+
(...args: TParameter): Promise<TReturn>;
|
|
98
|
+
/**
|
|
99
|
+
* Cache key generator.
|
|
100
|
+
*/
|
|
101
|
+
key: (...args: TParameter) => string;
|
|
102
|
+
/**
|
|
103
|
+
* Invalidate cache by keys.
|
|
104
|
+
*/
|
|
105
|
+
invalidate: (...keys: string[]) => Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Set cache with key, value and ttl.
|
|
108
|
+
*
|
|
109
|
+
* @param key
|
|
110
|
+
* @param value
|
|
111
|
+
* @param ttl
|
|
112
|
+
*/
|
|
113
|
+
set: (key: string, value: TReturn, ttl?: DurationLike) => Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* Get cache by key.
|
|
116
|
+
*
|
|
117
|
+
* @param key
|
|
118
|
+
*/
|
|
119
|
+
get: (key: string) => Promise<TReturn | undefined>;
|
|
120
|
+
}
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/providers/MemoryCacheProvider.d.ts
|
|
201
123
|
type CacheName = string;
|
|
202
124
|
type CacheKey = string;
|
|
203
125
|
type CacheValue = {
|
|
204
|
-
|
|
205
|
-
|
|
126
|
+
data?: Uint8Array;
|
|
127
|
+
timeout?: Timeout;
|
|
206
128
|
};
|
|
207
129
|
declare class MemoryCacheProvider implements CacheProvider {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
130
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
131
|
+
protected readonly log: _alepha_core0.Logger;
|
|
132
|
+
protected store: Record<CacheName, Record<CacheKey, CacheValue>>;
|
|
133
|
+
get(name: string, key: string): Promise<Uint8Array | undefined>;
|
|
134
|
+
set(name: string, key: string, value: Uint8Array, ttl?: number): Promise<Uint8Array>;
|
|
135
|
+
del(name: string, ...keys: string[]): Promise<void>;
|
|
136
|
+
has(name: string, key: string): Promise<boolean>;
|
|
137
|
+
keys(name: string): Promise<string[]>;
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/providers/CacheDescriptorProvider.d.ts
|
|
141
|
+
declare const envSchema: _alepha_core5.TObject<{
|
|
142
|
+
CACHE_DEFAULT_TTL: _sinclair_typebox1.TNumber;
|
|
143
|
+
CACHE_PREFIX: _sinclair_typebox1.TOptional<_sinclair_typebox1.TString>;
|
|
144
|
+
CACHE_ENABLED: _sinclair_typebox1.TBoolean;
|
|
222
145
|
}>;
|
|
223
146
|
declare module "alepha" {
|
|
224
|
-
|
|
225
|
-
}
|
|
147
|
+
interface Env extends Partial<Static<typeof envSchema>> {}
|
|
226
148
|
}
|
|
227
149
|
declare class CacheDescriptorProvider {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
150
|
+
protected readonly alepha: Alepha;
|
|
151
|
+
protected readonly cacheProvider: CacheProvider;
|
|
152
|
+
protected readonly memoryCacheProvider: MemoryCacheProvider;
|
|
153
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
154
|
+
protected readonly env: {
|
|
155
|
+
CACHE_PREFIX?: string | undefined;
|
|
156
|
+
CACHE_DEFAULT_TTL: number;
|
|
157
|
+
CACHE_ENABLED: boolean;
|
|
158
|
+
};
|
|
159
|
+
protected readonly caches: Cache[];
|
|
160
|
+
protected readonly configure: _alepha_core5.HookDescriptor<"configure">;
|
|
161
|
+
register(cache: Cache): Cache<any, any[]>;
|
|
162
|
+
processDescriptors(): void;
|
|
163
|
+
getCaches(): Cache[];
|
|
164
|
+
/**
|
|
165
|
+
* Clear all cache entries.
|
|
166
|
+
*/
|
|
167
|
+
clear(): Promise<void>;
|
|
168
|
+
/**
|
|
169
|
+
* Get the store provider for the given cache options.
|
|
170
|
+
*
|
|
171
|
+
* @param options
|
|
172
|
+
*/
|
|
173
|
+
provider(options: Pick<CacheDescriptorOptions<any[], any>, "provider">): CacheProvider;
|
|
174
|
+
/**
|
|
175
|
+
* Get the cache key for the given state and arguments.
|
|
176
|
+
*/
|
|
177
|
+
key(cache: Cache, ...args: any[]): string;
|
|
178
|
+
/**
|
|
179
|
+
* Invalidate the cache for the given state and arguments.
|
|
180
|
+
*/
|
|
181
|
+
invalidate(cache: Cache, ...keys: string[]): Promise<void>;
|
|
182
|
+
/**
|
|
183
|
+
* Run the cache handler with the given state and arguments.
|
|
184
|
+
* You must run on a $cache with a handler defined.
|
|
185
|
+
*/
|
|
186
|
+
run<TReturn, TParameter extends any[]>(cache: Cache<TReturn, TParameter>, ...args: TParameter): Promise<TReturn>;
|
|
187
|
+
get<TReturn>(cache: Cache<TReturn>, key: string): Promise<TReturn | undefined>;
|
|
188
|
+
/**
|
|
189
|
+
* Manually set a value in the cache.
|
|
190
|
+
* It's used by .run() method, but you will need it when you don't have cache handler defined.
|
|
191
|
+
*
|
|
192
|
+
* @param cache Cache object with all configuration and options (even TTL).
|
|
193
|
+
* @param key Cache key, build with .key() method or manually.
|
|
194
|
+
* @param value Value to store in cache.
|
|
195
|
+
* @param ttl Override cache.ttl option.
|
|
196
|
+
*/
|
|
197
|
+
set<TReturn>(cache: Cache<TReturn>, key: string, value: TReturn, ttl?: DurationLike): Promise<void>;
|
|
198
|
+
protected encoder: TextEncoder;
|
|
199
|
+
protected decoder: TextDecoder;
|
|
200
|
+
protected codes: {
|
|
201
|
+
BINARY: number;
|
|
202
|
+
JSON: number;
|
|
203
|
+
STRING: number;
|
|
204
|
+
};
|
|
205
|
+
protected serialize<TReturn>(value: TReturn): Uint8Array;
|
|
206
|
+
protected deserialize<TReturn>(uint8Array: Uint8Array): Promise<TReturn>;
|
|
278
207
|
}
|
|
279
208
|
interface Cache<TReturn = any, TParameter extends any[] = any[]> {
|
|
280
|
-
|
|
281
|
-
|
|
209
|
+
name: string;
|
|
210
|
+
options: CacheDescriptorOptions<TReturn, TParameter>;
|
|
282
211
|
}
|
|
283
|
-
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/index.d.ts
|
|
284
214
|
/**
|
|
285
215
|
* Alepha Cache Module
|
|
286
216
|
*
|
|
@@ -291,8 +221,9 @@ interface Cache<TReturn = any, TParameter extends any[] = any[]> {
|
|
|
291
221
|
* @module alepha.cache
|
|
292
222
|
*/
|
|
293
223
|
declare class AlephaCache implements Module {
|
|
294
|
-
|
|
295
|
-
|
|
224
|
+
readonly name = "alepha.cache";
|
|
225
|
+
readonly $services: (alepha: Alepha) => Alepha;
|
|
296
226
|
}
|
|
297
|
-
|
|
298
|
-
export { $cache, AlephaCache,
|
|
227
|
+
//#endregion
|
|
228
|
+
export { $cache, AlephaCache, Cache, CacheDescriptor, CacheDescriptorOptions, CacheDescriptorProvider, CacheProvider, MemoryCacheProvider };
|
|
229
|
+
//# sourceMappingURL=index.d.ts.map
|
package/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@alepha/cache'
|
|
1
|
+
export * from '@alepha/cache'
|
package/core.cjs
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.keys(core).forEach(function (k) {
|
|
2
|
+
var m = require('@alepha/core');
|
|
3
|
+
Object.keys(m).forEach(function (k) {
|
|
8
4
|
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
5
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
6
|
+
get: function () { return m[k]; }
|
|
11
7
|
});
|
|
12
|
-
});
|
|
8
|
+
});
|