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/security.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@alepha/security'
|
|
1
|
+
export * from '@alepha/security'
|
package/server/cache.cjs
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.keys(serverCache).forEach(function (k) {
|
|
2
|
+
var m = require('@alepha/server-cache');
|
|
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
|
+
});
|
package/server/cache.d.ts
CHANGED
|
@@ -1,51 +1,85 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { Cache, CacheDescriptorOptions, CacheDescriptorProvider } from "@alepha/cache";
|
|
2
|
+
import { ServerHandler, ServerRequestConfig } from "@alepha/server";
|
|
3
|
+
import * as _alepha_core1 from "@alepha/core";
|
|
4
|
+
import { Alepha, Module, OPTIONS } from "@alepha/core";
|
|
5
|
+
import { DateTimeProvider, DurationLike } from "@alepha/datetime";
|
|
6
6
|
|
|
7
|
+
//#region src/providers/ServerCacheProvider.d.ts
|
|
7
8
|
declare module "alepha/server" {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
interface ServerRoute {
|
|
10
|
+
cache?: ServerRouteCache;
|
|
11
|
+
}
|
|
12
|
+
interface ActionDescriptor {
|
|
13
|
+
invalidate: () => Promise<void>;
|
|
14
|
+
}
|
|
14
15
|
}
|
|
15
16
|
declare class ServerCacheProvider {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
protected readonly log: _alepha_core1.Logger;
|
|
18
|
+
protected readonly alepha: Alepha;
|
|
19
|
+
protected readonly cacheProvider: CacheDescriptorProvider;
|
|
20
|
+
protected readonly time: DateTimeProvider;
|
|
21
|
+
protected readonly caches: Map<ServerHandler, RouteCache>;
|
|
22
|
+
readonly onConfigure: _alepha_core1.HookDescriptor<"configure">;
|
|
23
|
+
readonly onRoute: _alepha_core1.HookDescriptor<"server:onRoute">;
|
|
24
|
+
readonly onRequest: _alepha_core1.HookDescriptor<"server:onRequest">;
|
|
25
|
+
readonly onSend: _alepha_core1.HookDescriptor<"server:onResponse">;
|
|
26
|
+
generateETag(content: string): string;
|
|
27
|
+
invalidate(route: RouteLike): Promise<void>;
|
|
28
|
+
protected getCacheByRoute(route: RouteLike): RouteCache | undefined;
|
|
29
|
+
protected createCacheKey(args: ServerRequestConfig): string;
|
|
29
30
|
}
|
|
30
|
-
type
|
|
31
|
+
type ServerRouteCache = boolean | DurationLike | Omit<CacheDescriptorOptions<any>, "handler" | "key">;
|
|
31
32
|
type RouteCache = Cache<{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
contentType?: string;
|
|
34
|
+
body: string;
|
|
35
|
+
status?: number;
|
|
36
|
+
lastModified: string;
|
|
37
|
+
hash: string;
|
|
37
38
|
}>;
|
|
38
39
|
type RouteLike = {
|
|
39
|
-
|
|
40
|
-
handler?: ServerHandler;
|
|
41
|
-
};
|
|
42
|
-
} | {
|
|
40
|
+
[OPTIONS]: {
|
|
43
41
|
handler?: ServerHandler;
|
|
42
|
+
};
|
|
43
|
+
} | {
|
|
44
|
+
handler?: ServerHandler;
|
|
44
45
|
};
|
|
45
|
-
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/index.d.ts
|
|
48
|
+
/**
|
|
49
|
+
* # Alepha Server Cache Module
|
|
50
|
+
*
|
|
51
|
+
* @description
|
|
52
|
+
* Plugin for Alepha Server that provides server-side caching capabilities.
|
|
53
|
+
* It uses the Alepha Cache module to cache responses from server actions ($action).
|
|
54
|
+
* It also provides a ETag-based cache invalidation mechanism.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* import { Alepha } from "@alepha/core";
|
|
59
|
+
* import { $action } from "@alepha/server";
|
|
60
|
+
* import { AlephaServerCache } from "alepha/server/cache";
|
|
61
|
+
*
|
|
62
|
+
* class ApiServer {
|
|
63
|
+
* hello = $action({
|
|
64
|
+
* cache: true,
|
|
65
|
+
* handler: () => "Hello, World!",
|
|
66
|
+
* });
|
|
67
|
+
* }
|
|
68
|
+
*
|
|
69
|
+
* const alepha = Alepha.create()
|
|
70
|
+
* .with(AlephaServerCache)
|
|
71
|
+
* .with(ApiServer);
|
|
72
|
+
*
|
|
73
|
+
* run(alepha);
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @see {@link ServerCacheProvider}
|
|
77
|
+
* @module alepha.server.cache
|
|
78
|
+
*/
|
|
46
79
|
declare class AlephaServerCache implements Module {
|
|
47
|
-
|
|
48
|
-
|
|
80
|
+
readonly name = "alepha.server.cache";
|
|
81
|
+
readonly $services: (alepha: Alepha) => Alepha;
|
|
49
82
|
}
|
|
50
|
-
|
|
51
|
-
export { AlephaServerCache, ServerCacheProvider,
|
|
83
|
+
//#endregion
|
|
84
|
+
export { AlephaServerCache, ServerCacheProvider, ServerRouteCache };
|
|
85
|
+
//# sourceMappingURL=index.d.ts.map
|
package/server/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@alepha/server-cache'
|
|
1
|
+
export * from '@alepha/server-cache'
|
package/server/cookies.cjs
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.keys(serverCookies).forEach(function (k) {
|
|
2
|
+
var m = require('@alepha/server-cookies');
|
|
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
|
+
});
|
package/server/cookies.d.ts
CHANGED
|
@@ -1,56 +1,61 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { DurationLike } from
|
|
1
|
+
import * as _alepha_core1 from "@alepha/core";
|
|
2
|
+
import { KIND, OPTIONS, Static, TSchema } from "@alepha/core";
|
|
3
|
+
import { DurationLike } from "@alepha/datetime";
|
|
4
|
+
import "@alepha/server";
|
|
4
5
|
|
|
6
|
+
//#region src/descriptors/$cookie.d.ts
|
|
5
7
|
interface CookieDescriptorOptions<T extends TSchema> {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
schema: T;
|
|
9
|
+
name: string;
|
|
10
|
+
path?: string;
|
|
11
|
+
ttl?: DurationLike;
|
|
12
|
+
secure?: boolean;
|
|
13
|
+
httpOnly?: boolean;
|
|
14
|
+
sameSite?: "strict" | "lax" | "none";
|
|
15
|
+
domain?: string;
|
|
16
|
+
compress?: boolean;
|
|
17
|
+
encrypt?: boolean;
|
|
18
|
+
sign?: boolean;
|
|
17
19
|
}
|
|
18
20
|
interface CookieDescriptor<T extends TSchema> {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
[KIND]: "COOKIE";
|
|
22
|
+
[OPTIONS]: CookieDescriptorOptions<T>;
|
|
23
|
+
set: (cookies: Cookies, value: Static<T>) => void;
|
|
24
|
+
get: (cookies: Cookies) => Static<T> | undefined;
|
|
25
|
+
del: (cookies: Cookies) => void;
|
|
24
26
|
}
|
|
25
27
|
declare const $cookie: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
<T extends TSchema>(options: CookieDescriptorOptions<T>): CookieDescriptor<T>;
|
|
29
|
+
[KIND]: string;
|
|
28
30
|
};
|
|
29
31
|
interface Cookies {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
req: Record<string, string>;
|
|
33
|
+
res: Record<string, Cookie | null>;
|
|
32
34
|
}
|
|
33
35
|
interface Cookie {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
value: string;
|
|
37
|
+
path?: string;
|
|
38
|
+
maxAge?: number;
|
|
39
|
+
secure?: boolean;
|
|
40
|
+
httpOnly?: boolean;
|
|
41
|
+
sameSite?: "strict" | "lax" | "none";
|
|
42
|
+
domain?: string;
|
|
41
43
|
}
|
|
42
|
-
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/providers/ServerCookiesProvider.d.ts
|
|
43
46
|
declare class ServerCookiesProvider {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
readonly onRequest: _alepha_core1.HookDescriptor<"server:onRequest">;
|
|
48
|
+
readonly onSend: _alepha_core1.HookDescriptor<"server:onSend">;
|
|
49
|
+
fromHeader(header: string): Record<string, string>;
|
|
50
|
+
toHeader(cookies: Record<string, Cookie | null>, isHttps?: boolean): string[];
|
|
48
51
|
}
|
|
49
|
-
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/index.d.ts
|
|
50
54
|
declare module "alepha/server" {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
interface ServerRequest {
|
|
56
|
+
cookies: Cookies;
|
|
57
|
+
}
|
|
54
58
|
}
|
|
55
|
-
|
|
56
|
-
export { $cookie,
|
|
59
|
+
//#endregion
|
|
60
|
+
export { $cookie, Cookie, CookieDescriptor, CookieDescriptorOptions, Cookies, ServerCookiesProvider };
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
package/server/cookies.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@alepha/server-cookies'
|
|
1
|
+
export * from '@alepha/server-cookies'
|
package/server/static.cjs
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.keys(serverStatic).forEach(function (k) {
|
|
2
|
+
var m = require('@alepha/server-static');
|
|
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
|
+
});
|
package/server/static.d.ts
CHANGED
|
@@ -1,109 +1,112 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { KIND, OPTIONS
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import * as _alepha_core0 from "@alepha/core";
|
|
2
|
+
import { Alepha, KIND, OPTIONS } from "@alepha/core";
|
|
3
|
+
import { DateTimeProvider, DurationLike } from "@alepha/datetime";
|
|
4
|
+
import { ServerHandler, ServerRouterProvider } from "@alepha/server";
|
|
5
5
|
|
|
6
|
+
//#region src/descriptors/$serve.d.ts
|
|
6
7
|
declare const KEY = "SERVE";
|
|
7
8
|
interface ServeDescriptorOptions {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Prefix for the served path.
|
|
11
|
+
*
|
|
12
|
+
* @default "/"
|
|
13
|
+
*/
|
|
14
|
+
path?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Path to the directory to serve.
|
|
17
|
+
*
|
|
18
|
+
* @default process.cwd()
|
|
19
|
+
*/
|
|
20
|
+
root?: string;
|
|
21
|
+
/**
|
|
22
|
+
* If true, descriptor will be ignored.
|
|
23
|
+
*
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to keep dot files (e.g. `.gitignore`, `.env`) in the served directory.
|
|
29
|
+
*
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
ignoreDotEnvFiles?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to use the index.html file when the path is a directory.
|
|
35
|
+
*
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
indexFallback?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Force all requests "not found" to be served with the index.html file.
|
|
41
|
+
* This is useful for single-page applications (SPAs) that use client-side only routing.
|
|
42
|
+
*/
|
|
43
|
+
historyApiFallback?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Optional name of the descriptor.
|
|
46
|
+
* This is used for logging and debugging purposes.
|
|
47
|
+
*
|
|
48
|
+
* @default Key name.
|
|
49
|
+
*/
|
|
50
|
+
name?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Whether to use cache control headers.
|
|
53
|
+
*
|
|
54
|
+
* @default {}
|
|
55
|
+
*/
|
|
56
|
+
cacheControl?: Partial<CacheControlOptions> | false;
|
|
56
57
|
}
|
|
57
58
|
interface CacheControlOptions {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Whether to use cache control headers.
|
|
61
|
+
*
|
|
62
|
+
* @default [.js, .css]
|
|
63
|
+
*/
|
|
64
|
+
fileTypes: string[];
|
|
65
|
+
/**
|
|
66
|
+
* The maximum age of the cache in seconds.
|
|
67
|
+
*
|
|
68
|
+
* @default 60 * 60 * 24 * 2 // 2 days
|
|
69
|
+
*/
|
|
70
|
+
maxAge: DurationLike;
|
|
71
|
+
/**
|
|
72
|
+
* Whether to use immutable cache control headers.
|
|
73
|
+
*
|
|
74
|
+
* @default true
|
|
75
|
+
*/
|
|
76
|
+
immutable: boolean;
|
|
76
77
|
}
|
|
77
78
|
interface ServeDescriptor {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
[KIND]: typeof KEY;
|
|
80
|
+
[OPTIONS]: ServeDescriptorOptions;
|
|
81
|
+
list(): string[];
|
|
81
82
|
}
|
|
82
83
|
declare const $serve: {
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
(options?: ServeDescriptorOptions): ServeDescriptor;
|
|
85
|
+
[KIND]: string;
|
|
85
86
|
};
|
|
86
|
-
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/providers/ServerStaticProvider.d.ts
|
|
87
89
|
declare class ServerStaticProvider {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
90
|
+
protected readonly alepha: Alepha;
|
|
91
|
+
protected readonly routerProvider: ServerRouterProvider;
|
|
92
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
93
|
+
protected readonly log: _alepha_core0.Logger;
|
|
94
|
+
protected readonly directories: ServeDirectory[];
|
|
95
|
+
protected readonly configure: _alepha_core0.HookDescriptor<"configure">;
|
|
96
|
+
list(name: string): string[];
|
|
97
|
+
serve(options: ServeDescriptorOptions): Promise<void>;
|
|
98
|
+
createFileHandler(filepath: string, options: ServeDescriptorOptions): Promise<ServerHandler>;
|
|
99
|
+
protected getCacheFileTypes(): string[];
|
|
100
|
+
protected getCacheControl(filename: string, options: ServeDescriptorOptions): {
|
|
101
|
+
maxAge: number;
|
|
102
|
+
immutable: boolean;
|
|
103
|
+
} | undefined;
|
|
104
|
+
getAllFiles(dir: string, ignoreDotEnvFiles?: boolean): Promise<string[]>;
|
|
103
105
|
}
|
|
104
106
|
interface ServeDirectory {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
options: ServeDescriptorOptions;
|
|
108
|
+
files: string[];
|
|
107
109
|
}
|
|
108
|
-
|
|
109
|
-
export { $serve,
|
|
110
|
+
//#endregion
|
|
111
|
+
export { $serve, CacheControlOptions, ServeDescriptor, ServeDescriptorOptions, ServeDirectory, ServerStaticProvider };
|
|
112
|
+
//# sourceMappingURL=index.d.ts.map
|
package/server/static.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '@alepha/server-static'
|
|
1
|
+
export * from '@alepha/server-static'
|
package/server/swagger.cjs
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Object.keys(serverSwagger).forEach(function (k) {
|
|
2
|
+
var m = require('@alepha/server-swagger');
|
|
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
|
+
});
|