alepha 0.6.10 → 0.7.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/README.md +14 -3
- package/assets/logo.png +0 -0
- package/cache.cjs +0 -1
- package/cache.d.ts +30 -13
- package/cache.js +0 -1
- package/core.cjs +0 -1
- package/core.d.ts +465 -183
- package/core.js +0 -1
- package/datetime.cjs +0 -1
- package/datetime.d.ts +32 -31
- package/datetime.js +0 -1
- package/lock.cjs +0 -1
- package/lock.d.ts +2 -2
- package/lock.js +0 -1
- package/package.json +55 -47
- package/postgres.cjs +0 -1
- package/postgres.d.ts +3276 -124
- package/postgres.js +0 -1
- package/queue.cjs +0 -1
- package/queue.d.ts +2 -2
- package/queue.js +0 -1
- package/react/auth.cjs +0 -1
- package/react/auth.d.ts +40 -32
- package/react/auth.js +0 -1
- package/react.cjs +0 -1
- package/react.d.ts +417 -234
- package/react.js +0 -1
- package/redis.cjs +0 -1
- package/redis.js +0 -1
- package/retry.cjs +12 -0
- package/retry.d.ts +68 -0
- package/retry.js +1 -0
- package/scheduler.cjs +0 -1
- package/scheduler.js +0 -1
- package/security.cjs +0 -1
- package/security.d.ts +71 -17
- package/security.js +0 -1
- package/server/cookies.cjs +0 -1
- package/server/cookies.d.ts +1 -1
- package/server/cookies.js +0 -1
- package/server/metrics.cjs +0 -1
- package/server/metrics.d.ts +1 -1
- package/server/metrics.js +0 -1
- package/server/proxy.cjs +0 -1
- package/server/proxy.d.ts +1 -35
- package/server/proxy.js +0 -1
- package/server/static.cjs +0 -1
- package/server/static.d.ts +6 -0
- package/server/static.js +0 -1
- package/server/swagger.cjs +0 -1
- package/server/swagger.d.ts +1 -0
- package/server/swagger.js +0 -1
- package/server.cjs +0 -1
- package/server.d.ts +639 -346
- package/server.js +0 -1
- package/src/retry.ts +1 -0
- package/topic.cjs +0 -1
- package/topic.d.ts +3 -3
- package/topic.js +0 -1
- package/vite.cjs +0 -1
- package/vite.d.ts +29 -30
- package/vite.js +0 -1
- package/cache.cjs.map +0 -1
- package/cache.js.map +0 -1
- package/core.cjs.map +0 -1
- package/core.js.map +0 -1
- package/datetime.cjs.map +0 -1
- package/datetime.js.map +0 -1
- package/lock.cjs.map +0 -1
- package/lock.js.map +0 -1
- package/postgres.cjs.map +0 -1
- package/postgres.js.map +0 -1
- package/queue.cjs.map +0 -1
- package/queue.js.map +0 -1
- package/react/auth.cjs.map +0 -1
- package/react/auth.js.map +0 -1
- package/react.cjs.map +0 -1
- package/react.js.map +0 -1
- package/redis.cjs.map +0 -1
- package/redis.js.map +0 -1
- package/scheduler.cjs.map +0 -1
- package/scheduler.js.map +0 -1
- package/security.cjs.map +0 -1
- package/security.js.map +0 -1
- package/server/cookies.cjs.map +0 -1
- package/server/cookies.js.map +0 -1
- package/server/metrics.cjs.map +0 -1
- package/server/metrics.js.map +0 -1
- package/server/proxy.cjs.map +0 -1
- package/server/proxy.js.map +0 -1
- package/server/static.cjs.map +0 -1
- package/server/static.js.map +0 -1
- package/server/swagger.cjs.map +0 -1
- package/server/swagger.js.map +0 -1
- package/server.cjs.map +0 -1
- package/server.js.map +0 -1
- package/topic.cjs.map +0 -1
- package/topic.js.map +0 -1
- package/vite.cjs.map +0 -1
- package/vite.js.map +0 -1
package/react.js
CHANGED
package/redis.cjs
CHANGED
package/redis.js
CHANGED
package/retry.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var retry = require('@alepha/retry');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.keys(retry).forEach(function (k) {
|
|
8
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return retry[k]; }
|
|
11
|
+
});
|
|
12
|
+
});
|
package/retry.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { MaybePromise } from '@alepha/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Retry Descriptor options.
|
|
5
|
+
*/
|
|
6
|
+
interface RetryDescriptorOptions<T extends (...args: any[]) => any> {
|
|
7
|
+
/**
|
|
8
|
+
* Maximum number of attempts.
|
|
9
|
+
*
|
|
10
|
+
* @default 3
|
|
11
|
+
*/
|
|
12
|
+
max?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Delay in milliseconds.
|
|
15
|
+
*
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
delay?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Optional condition to determine when to retry.
|
|
21
|
+
*/
|
|
22
|
+
when?: (error: Error) => boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The function to retry.
|
|
25
|
+
*/
|
|
26
|
+
handler: T;
|
|
27
|
+
/**
|
|
28
|
+
* Optional error handler.
|
|
29
|
+
*
|
|
30
|
+
* This will be called when an error occurs.
|
|
31
|
+
*
|
|
32
|
+
* @default undefined
|
|
33
|
+
*/
|
|
34
|
+
onError?: (error: Error, attempt: number, ...parameters: Parameters<T>) => void;
|
|
35
|
+
}
|
|
36
|
+
type RetryDescriptor<T extends (...args: any[]) => any> = (...parameters: Parameters<T>) => MaybePromise<ReturnType<T>>;
|
|
37
|
+
/**
|
|
38
|
+
* `$retry` creates a retry descriptor.
|
|
39
|
+
*
|
|
40
|
+
* It will retry the given function up to `max` times with a delay of `delay` milliseconds between attempts.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* import { $retry } from "@alepha/core";
|
|
45
|
+
*
|
|
46
|
+
* class MyService {
|
|
47
|
+
* fetchData = $retry({
|
|
48
|
+
* max: 5, // maximum number of attempts
|
|
49
|
+
* delay: 1000, // ms
|
|
50
|
+
* when: (error) => error.message.includes("Network Error"),
|
|
51
|
+
* handler: async (url: string) => {
|
|
52
|
+
* const response = await fetch(url);
|
|
53
|
+
* if (!response.ok) {
|
|
54
|
+
* throw new Error(`Failed to fetch: ${response.statusText}`);
|
|
55
|
+
* }
|
|
56
|
+
* return response.json();
|
|
57
|
+
* },
|
|
58
|
+
* onError: (error, attempt, url) => {
|
|
59
|
+
* // error happened, log it or handle it
|
|
60
|
+
* console.error(`Attempt ${attempt} failed for ${url}:`, error);
|
|
61
|
+
* },
|
|
62
|
+
* });
|
|
63
|
+
* }
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
declare const $retry: <T extends (...args: any[]) => any>(opts: RetryDescriptorOptions<T>) => RetryDescriptor<T>;
|
|
67
|
+
|
|
68
|
+
export { $retry, type RetryDescriptor, type RetryDescriptorOptions };
|
package/retry.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@alepha/retry';
|
package/scheduler.cjs
CHANGED
package/scheduler.js
CHANGED
package/security.cjs
CHANGED
package/security.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _alepha_core from '@alepha/core';
|
|
2
2
|
import { Static as Static$1, KIND, OPTIONS, Alepha } from '@alepha/core';
|
|
3
|
-
import { JWSHeaderParameters, FlattenedJWSInput, CryptoKey, KeyObject, JSONWebKeySet, JWTVerifyResult, JWTPayload
|
|
3
|
+
import { JWTHeaderParameters, JWSHeaderParameters, FlattenedJWSInput, CryptoKey, KeyObject, JSONWebKeySet, JWTVerifyResult, JWTPayload } from 'jose';
|
|
4
|
+
import { DateTimeProvider } from '@alepha/datetime';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Represents a User Account extracted from JWT.
|
|
@@ -18,6 +19,14 @@ interface UserAccountInfo {
|
|
|
18
19
|
* User full name, if available.
|
|
19
20
|
*/
|
|
20
21
|
name?: string;
|
|
22
|
+
/**
|
|
23
|
+
* User email, if available.
|
|
24
|
+
*/
|
|
25
|
+
email?: string;
|
|
26
|
+
/**
|
|
27
|
+
* User profile picture URL, if available.
|
|
28
|
+
*/
|
|
29
|
+
picture?: string;
|
|
21
30
|
/**
|
|
22
31
|
* Organization ID, if available.
|
|
23
32
|
*/
|
|
@@ -237,6 +246,7 @@ declare const roleSchema: TObject<{
|
|
|
237
246
|
permissions: TArray<TObject<{
|
|
238
247
|
name: TString;
|
|
239
248
|
ownership: TOptional<TBoolean>;
|
|
249
|
+
exclude: TOptional<TArray<TString>>;
|
|
240
250
|
}>>;
|
|
241
251
|
}>;
|
|
242
252
|
type Role = Static$1<typeof roleSchema>;
|
|
@@ -247,6 +257,7 @@ type Role = Static$1<typeof roleSchema>;
|
|
|
247
257
|
declare class JwtProvider {
|
|
248
258
|
protected readonly log: _alepha_core.Logger;
|
|
249
259
|
protected readonly keystore: KeyLoaderHolder[];
|
|
260
|
+
protected readonly dateTimeProvider: DateTimeProvider;
|
|
250
261
|
/**
|
|
251
262
|
* Adds a key loader to the embedded keystore.
|
|
252
263
|
*
|
|
@@ -312,7 +323,7 @@ interface KeyLoaderHolder {
|
|
|
312
323
|
interface JwtSignOptions {
|
|
313
324
|
issuedAt?: boolean;
|
|
314
325
|
protectedHeader?: JWTHeaderParameters;
|
|
315
|
-
expiresIn?:
|
|
326
|
+
expiresIn?: number;
|
|
316
327
|
}
|
|
317
328
|
interface ExtendedJWTPayload extends JWTPayload {
|
|
318
329
|
name?: string;
|
|
@@ -395,11 +406,11 @@ declare class SecurityProvider {
|
|
|
395
406
|
* Creates a user account from the provided payload.
|
|
396
407
|
*
|
|
397
408
|
* @param payload - The payload to create the user account from.
|
|
398
|
-
* @param [
|
|
409
|
+
* @param [realmName] - The realm containing the roles. Default is all.
|
|
399
410
|
*
|
|
400
411
|
* @returns The user info created from the payload.
|
|
401
412
|
*/
|
|
402
|
-
createInfoFromPayload(payload: JWTPayload,
|
|
413
|
+
createInfoFromPayload(payload: JWTPayload, realmName?: string): UserAccountInfo;
|
|
403
414
|
/**
|
|
404
415
|
* Checks if the user has the specified permission.
|
|
405
416
|
*
|
|
@@ -423,7 +434,11 @@ declare class SecurityProvider {
|
|
|
423
434
|
* @param permission - The permission to check for.
|
|
424
435
|
* @returns True if the user has the role, false otherwise.
|
|
425
436
|
*/
|
|
426
|
-
can(
|
|
437
|
+
can(roleName: string, permission: string | Permission): boolean;
|
|
438
|
+
/**
|
|
439
|
+
* Checks if a user has ownership of a specific permission.
|
|
440
|
+
*/
|
|
441
|
+
ownership(roleName: string, permission: string | Permission): string | boolean | undefined;
|
|
427
442
|
/**
|
|
428
443
|
* Converts a permission object to a string.
|
|
429
444
|
*
|
|
@@ -461,6 +476,8 @@ declare class SecurityProvider {
|
|
|
461
476
|
* @return An array of role strings.
|
|
462
477
|
*/
|
|
463
478
|
getRolesFromPayload(payload: Record<string, any>): string[];
|
|
479
|
+
getPictureFromPayload(payload: Record<string, any>): string | undefined;
|
|
480
|
+
getEmailFromPayload(payload: Record<string, any>): string | undefined;
|
|
464
481
|
/**
|
|
465
482
|
* Returns the name from the given payload.
|
|
466
483
|
*
|
|
@@ -494,6 +511,7 @@ interface Realm {
|
|
|
494
511
|
* This is useful when you want to use a custom user provider for a specific realm.
|
|
495
512
|
*/
|
|
496
513
|
userAccountProvider?: SecurityUserAccountProvider;
|
|
514
|
+
onLoadUser?: (user: UserAccountInfo) => Promise<void> | void;
|
|
497
515
|
}
|
|
498
516
|
interface SecurityUserAccountProvider {
|
|
499
517
|
jwks: string | undefined;
|
|
@@ -532,7 +550,7 @@ interface RealmDescriptorOptions {
|
|
|
532
550
|
*
|
|
533
551
|
* Note: You can skip this if you are using a user account provider with JWKS.
|
|
534
552
|
*/
|
|
535
|
-
secret?: string | JSONWebKeySet;
|
|
553
|
+
secret?: string | JSONWebKeySet | (() => string);
|
|
536
554
|
/**
|
|
537
555
|
* Attach a user account provider to the realm to manage roles.
|
|
538
556
|
* For example, you can use a KeycloakUserProvider to automatically create realm roles inside Keycloak.
|
|
@@ -596,12 +614,47 @@ declare const $role: {
|
|
|
596
614
|
};
|
|
597
615
|
|
|
598
616
|
/**
|
|
599
|
-
*
|
|
617
|
+
* Allow to get an access token for a service account.
|
|
618
|
+
*
|
|
619
|
+
* You have some options to configure the service account:
|
|
620
|
+
* - a OAUTH2 URL using client credentials grant type
|
|
621
|
+
* - a JWT secret shared between the services
|
|
600
622
|
*
|
|
601
|
-
* @
|
|
623
|
+
* @example
|
|
624
|
+
* ```ts
|
|
625
|
+
* import { $serviceAccount } from "@alepha/security";
|
|
626
|
+
*
|
|
627
|
+
* class MyService {
|
|
628
|
+
* serviceAccount = $serviceAccount({
|
|
629
|
+
* oauth2: {
|
|
630
|
+
* url: "https://example.com/oauth2/token",
|
|
631
|
+
* clientId: "your-client-id",
|
|
632
|
+
* clientSecret: "your-client-secret",
|
|
633
|
+
* }
|
|
634
|
+
* });
|
|
635
|
+
*
|
|
636
|
+
* async fetchData() {
|
|
637
|
+
* const token = await this.serviceAccount.token();
|
|
638
|
+
* // or
|
|
639
|
+
* const response = await this.serviceAccount.fetch("https://api.example.com/data");
|
|
640
|
+
* }
|
|
641
|
+
* }
|
|
642
|
+
* ```
|
|
602
643
|
*/
|
|
603
644
|
declare const $serviceAccount: (options: ServiceAccountDescriptorOptions) => ServiceAccountDescriptor;
|
|
604
|
-
|
|
645
|
+
type ServiceAccountDescriptorOptions = {
|
|
646
|
+
gracePeriod?: number;
|
|
647
|
+
} & ({
|
|
648
|
+
oauth2: Oauth2ServiceAccountDescriptorOptions;
|
|
649
|
+
} | {
|
|
650
|
+
jwt: JwtServiceAccountDescriptorOptions;
|
|
651
|
+
});
|
|
652
|
+
interface JwtServiceAccountDescriptorOptions {
|
|
653
|
+
secret: string;
|
|
654
|
+
roles?: string[];
|
|
655
|
+
signOptions?: JwtSignOptions;
|
|
656
|
+
}
|
|
657
|
+
interface Oauth2ServiceAccountDescriptorOptions {
|
|
605
658
|
/**
|
|
606
659
|
* Get Token URL.
|
|
607
660
|
*/
|
|
@@ -614,16 +667,9 @@ interface ServiceAccountDescriptorOptions {
|
|
|
614
667
|
* Client Secret.
|
|
615
668
|
*/
|
|
616
669
|
clientSecret: string;
|
|
617
|
-
/**
|
|
618
|
-
* Scopes to request.
|
|
619
|
-
*/
|
|
620
|
-
scope?: string;
|
|
621
670
|
}
|
|
622
671
|
interface ServiceAccountDescriptor {
|
|
623
|
-
options: ServiceAccountDescriptorOptions;
|
|
624
|
-
store: ServiceAccountStore;
|
|
625
672
|
token: () => Promise<string>;
|
|
626
|
-
fetch(url: string, options?: RequestInit): Promise<Response>;
|
|
627
673
|
}
|
|
628
674
|
interface AccessTokenResponse {
|
|
629
675
|
access_token: string;
|
|
@@ -643,9 +689,17 @@ declare class SecurityError extends Error {
|
|
|
643
689
|
readonly code = "ERR_SECURITY";
|
|
644
690
|
}
|
|
645
691
|
|
|
692
|
+
declare module "alepha/core" {
|
|
693
|
+
interface Hooks {
|
|
694
|
+
"security:user:created": {
|
|
695
|
+
realm: string;
|
|
696
|
+
user: UserAccountInfo;
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
}
|
|
646
700
|
declare class SecurityModule {
|
|
647
701
|
protected readonly alepha: Alepha;
|
|
648
702
|
constructor();
|
|
649
703
|
}
|
|
650
704
|
|
|
651
|
-
export { $permission, $realm, $role, $serviceAccount, type AccessTokenResponse, type ExtendedJWTPayload, InvalidPermissionError, type JwtParseResult, JwtProvider, type JwtSignOptions, type KeyLoader, type KeyLoaderHolder, type Permission, type PermissionDescriptor, type PermissionDescriptorOptions, type Realm, type RealmConfig, type RealmDescriptor, type RealmDescriptorOptions, type Role, type RoleDescriptor, type RoleDescriptorOptions, type SecurityCheckResult, SecurityError, SecurityModule, SecurityProvider, type SecurityUserAccountProvider, type ServiceAccountDescriptor, type ServiceAccountDescriptorOptions, type ServiceAccountStore, type UserAccountInfo, type UserAccountToken, permissionSchema, roleSchema };
|
|
705
|
+
export { $permission, $realm, $role, $serviceAccount, type AccessTokenResponse, type ExtendedJWTPayload, InvalidPermissionError, type JwtParseResult, JwtProvider, type JwtServiceAccountDescriptorOptions, type JwtSignOptions, type KeyLoader, type KeyLoaderHolder, type Oauth2ServiceAccountDescriptorOptions, type Permission, type PermissionDescriptor, type PermissionDescriptorOptions, type Realm, type RealmConfig, type RealmDescriptor, type RealmDescriptorOptions, type Role, type RoleDescriptor, type RoleDescriptorOptions, type SecurityCheckResult, SecurityError, SecurityModule, SecurityProvider, type SecurityUserAccountProvider, type ServiceAccountDescriptor, type ServiceAccountDescriptorOptions, type ServiceAccountStore, type UserAccountInfo, type UserAccountToken, permissionSchema, roleSchema };
|
package/security.js
CHANGED
package/server/cookies.cjs
CHANGED
package/server/cookies.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ declare class ServerCookiesProvider {
|
|
|
44
44
|
readonly onRequest: _alepha_core.HookDescriptor<"server:onRequest">;
|
|
45
45
|
readonly onSend: _alepha_core.HookDescriptor<"server:onSend">;
|
|
46
46
|
fromHeader(header: string): Record<string, string>;
|
|
47
|
-
toHeader(cookies: Record<string, Cookie | null
|
|
47
|
+
toHeader(cookies: Record<string, Cookie | null>, isHttps?: boolean): string[];
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
declare module "alepha/server" {
|
package/server/cookies.js
CHANGED
package/server/metrics.cjs
CHANGED
package/server/metrics.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare class ServerMetricsProvider {
|
|
|
6
6
|
private memoryUsage;
|
|
7
7
|
private gcDuration;
|
|
8
8
|
private heapUsage;
|
|
9
|
-
readonly metrics: _alepha_server.
|
|
9
|
+
readonly metrics: _alepha_server.ActionDescriptor<_alepha_server.RequestConfigSchema>;
|
|
10
10
|
constructor();
|
|
11
11
|
private collectMetrics;
|
|
12
12
|
}
|
package/server/metrics.js
CHANGED
package/server/proxy.cjs
CHANGED
package/server/proxy.d.ts
CHANGED
|
@@ -1,35 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Async, KIND, OPTIONS, Alepha } from '@alepha/core';
|
|
3
|
-
import { ServerRequest, ServerRouterProvider } from '@alepha/server';
|
|
4
|
-
|
|
5
|
-
type ProxyDescriptorOptions = {
|
|
6
|
-
path: string;
|
|
7
|
-
target: string;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
beforeRequest?: (request: ServerRequest, proxyRequest: RequestInit) => Async<void>;
|
|
10
|
-
afterResponse?: (request: ServerRequest, proxyResponse: Response) => Async<void>;
|
|
11
|
-
rewrite?: (url: URL) => void;
|
|
12
|
-
};
|
|
13
|
-
interface ProxyDescriptor {
|
|
14
|
-
[KIND]: "PROXY";
|
|
15
|
-
[OPTIONS]: ProxyDescriptorOptions;
|
|
16
|
-
}
|
|
17
|
-
declare const $proxy: {
|
|
18
|
-
(options: ProxyDescriptorOptions): ProxyDescriptor;
|
|
19
|
-
[KIND]: string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
declare class ServerProxyProvider {
|
|
23
|
-
protected readonly routerProvider: ServerRouterProvider;
|
|
24
|
-
protected readonly alepha: Alepha;
|
|
25
|
-
readonly configure: _alepha_core.HookDescriptor<"configure">;
|
|
26
|
-
proxy(options: ProxyDescriptorOptions): Promise<void>;
|
|
27
|
-
private getRawRequestBody;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
declare class ServerProxyModule {
|
|
31
|
-
protected readonly alepha: Alepha;
|
|
32
|
-
constructor();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { $proxy, type ProxyDescriptor, type ProxyDescriptorOptions, ServerProxyModule, ServerProxyProvider };
|
|
1
|
+
export * from '@alepha/server-proxy';
|
package/server/proxy.js
CHANGED
package/server/static.cjs
CHANGED
package/server/static.d.ts
CHANGED
|
@@ -35,6 +35,11 @@ interface ServeDescriptorOptions {
|
|
|
35
35
|
* @default true
|
|
36
36
|
*/
|
|
37
37
|
indexFallback?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Force all requests "not found" to be served with the index.html file.
|
|
40
|
+
* This is useful for single-page applications (SPAs) that use client-side only routing.
|
|
41
|
+
*/
|
|
42
|
+
historyApiFallback?: boolean;
|
|
38
43
|
/**
|
|
39
44
|
* Optional name of the descriptor.
|
|
40
45
|
* This is used for logging and debugging purposes.
|
|
@@ -89,6 +94,7 @@ declare class ServerStaticProvider {
|
|
|
89
94
|
list(name: string): string[];
|
|
90
95
|
serve(options: ServeDescriptorOptions): Promise<void>;
|
|
91
96
|
createFileHandler(filepath: string, options: ServeDescriptorOptions): Promise<ServerHandler>;
|
|
97
|
+
protected getCacheFileTypes(): string[];
|
|
92
98
|
protected getCacheControl(filename: string, options: ServeDescriptorOptions): {
|
|
93
99
|
maxAge: number;
|
|
94
100
|
immutable: boolean;
|
package/server/static.js
CHANGED
package/server/swagger.cjs
CHANGED
package/server/swagger.d.ts
CHANGED
package/server/swagger.js
CHANGED
package/server.cjs
CHANGED